From 53edb464f556a280c82e42592441a377d708ec19 Mon Sep 17 00:00:00 2001 From: jeremyhi Date: Mon, 12 Oct 2026 18:30:18 +0800 Subject: [PATCH] ci: fail an S3 benchmark run on EC2 without a local instance store Without an instance store the Raft Engine WAL of the R cells silently stayed on the root EBS volume, so the run measured a different baseline. Only a smoke run may keep it on the root volume now. Signed-off-by: jeremyhi --- .github/scripts/oswal-s3-bench-run.sh | 2 ++ tests/perf/test_oswal_s3_bench_scripts.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/scripts/oswal-s3-bench-run.sh b/.github/scripts/oswal-s3-bench-run.sh index 068f02d584a..2011322d278 100644 --- a/.github/scripts/oswal-s3-bench-run.sh +++ b/.github/scripts/oswal-s3-bench-run.sh @@ -33,6 +33,8 @@ pull_images() { wal_disk() { local root=$1 device device=$(lsblk -dnpo NAME,MODEL | awk '/Instance Storage/ {print $1; exit}') + # Only a smoke run may keep the Raft Engine WAL on the root volume. + [[ -n "$device" || "${SMOKE:-}" == true ]] || { echo 'No local NVMe instance store; choose an instance type with one' >&2; return 1; } sudo -n mkdir -p "$root" if [[ -n "$device" ]]; then sudo -n umount "$device" 2>/dev/null || true diff --git a/tests/perf/test_oswal_s3_bench_scripts.py b/tests/perf/test_oswal_s3_bench_scripts.py index 92824fdabb5..30eaf0ef20a 100644 --- a/tests/perf/test_oswal_s3_bench_scripts.py +++ b/tests/perf/test_oswal_s3_bench_scripts.py @@ -264,6 +264,16 @@ class CellLifecycleTest(unittest.TestCase): # the run script against fake docke self.assertEqual(log.count("docker stop -t 120 fakecid"), 2) self.assertEqual(log.count("docker rm -fv fakecid"), 2) + def test_an_ec2_run_without_an_instance_store_fails(self): + with tempfile.TemporaryDirectory() as directory: + (Path(directory) / "lsblk").write_text("#!/usr/bin/env bash\necho '/dev/nvme0n1 Amazon Elastic Block Store'\n") + (Path(directory) / "lsblk").chmod(0o755) + env = os.environ | {"PATH": f"{directory}:{os.environ['PATH']}", "SMOKE": "false"} + done = subprocess.run(["bash", str(SCRIPTS / "oswal-s3-bench-run.sh"), "wal-disk", f"{directory}/wal"], + env=env, capture_output=True, text=True, timeout=60) + self.assertNotEqual(done.returncode, 0) + self.assertIn("No local NVMe instance store", done.stderr) + def test_a_failed_scrape_fails_a_successful_load(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory)