From 1786397e2dba0cd29a96c78f222edc26e25786ae Mon Sep 17 00:00:00 2001 From: jeremyhi Date: Tue, 13 Oct 2026 08:04:23 +0800 Subject: [PATCH] ci: keep extra_env off the WAL settings and check depths only for object store cells extra_env may no longer set GREPTIMEDB_STANDALONE__WAL__ keys, which define the configuration a cell reports, and the Raft Engine controls no longer fail a sweep whose depth relation they never use. Signed-off-by: jeremyhi --- .github/scripts/oswal-s3-bench.py | 8 +++++--- tests/perf/test_oswal_s3_bench_scripts.py | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/scripts/oswal-s3-bench.py b/.github/scripts/oswal-s3-bench.py index 25e49c87baf..76f6f7c0e43 100644 --- a/.github/scripts/oswal-s3-bench.py +++ b/.github/scripts/oswal-s3-bench.py @@ -47,6 +47,7 @@ DEPTHS = {"GREPTIMEDB_OSWAL_MAX_IN_FLIGHT_CREATES": 4, "GREPTIMEDB_OSWAL_MAX_SEA "GREPTIMEDB_OSWAL_RECOVERY_CONCURRENCY": 8} # Restart cells seal ten times as often as the default so recovery has thousands of objects. RESTART_FLUSH_INTERVAL = "10ms" +RESERVED_ENV = ("GREPTIMEDB_STANDALONE__STORAGE__", "GREPTIMEDB_STANDALONE__WAL__") ENV_NAME = re.compile(r"[A-Za-z_][A-Za-z0-9_]*") IMAGE = re.compile(r"[a-z0-9]+(?:[._-][a-z0-9]+)*(?::[0-9]+)?(?:/[a-z0-9]+(?:[._-][a-z0-9]+)*)+" r"(?::[A-Za-z0-9_][A-Za-z0-9_.-]{0,127})?(?:@sha256:[0-9a-f]{64})?") @@ -94,7 +95,7 @@ def build_manifest(plan: dict, greptimedb_inspect: list, runtime_image: str, def parse_extra_env(text: str) -> dict: - """A JSON object or K=V lines; the storage settings stay the benchmark's own.""" + """A JSON object or K=V lines; the storage and WAL settings that define a cell stay the benchmark's own.""" if text.strip().startswith("{"): parsed = json.loads(text) if not all(isinstance(v, (str, int)) and not isinstance(v, bool) for v in parsed.values()): @@ -108,7 +109,7 @@ def parse_extra_env(text: str) -> dict: raise ValueError(f"extra_env line is not a new K=V: {line!r}") env[name.strip()] = value.strip() for name, value in env.items(): - if not ENV_NAME.fullmatch(name) or name.startswith("GREPTIMEDB_STANDALONE__STORAGE__") or "\n" in value: + if not ENV_NAME.fullmatch(name) or name.startswith(RESERVED_ENV) or "\n" in value: raise ValueError(f"extra_env may not set {name!r}") if name in DEPTHS: positive(name, value, 4096) @@ -161,7 +162,8 @@ def build_plan(concurrency: str, rows: str, batch_rows: str, rounds: str, smoke: for level in levels: for config, point in series if round_number % 2 else reversed(series): cell_env = env | ({swept: str(point)} if point is not None else {}) - check_depths(cell_env) + if config not in BASELINES: + check_depths(cell_env) wal = WAL_CONFIGS[config] | ({"FLUSH_INTERVAL": RESTART_FLUSH_INTERVAL} if restart and config not in BASELINES else {}) cells.append({ "id": f"{round_number}-{level}-{config}" + (f"-{point}" if point is not None else ""), diff --git a/tests/perf/test_oswal_s3_bench_scripts.py b/tests/perf/test_oswal_s3_bench_scripts.py index b617874db3c..f43baf12460 100644 --- a/tests/perf/test_oswal_s3_bench_scripts.py +++ b/tests/perf/test_oswal_s3_bench_scripts.py @@ -87,6 +87,10 @@ class PlanTest(unittest.TestCase): self.assertEqual((cells["1-8-R0"]["env"], cells["1-8-R0"]["sweep_value"]), ({}, None)) self.assertEqual(cells["1-8-R0"]["wal"], {"PROVIDER": "raft_engine", "SYNC_WRITE": "false", "DIR": "/wal"}) self.assertEqual(plan["sweep"], {"name": "GREPTIMEDB_OSWAL_MAX_IN_FLIGHT_CREATES", "values": [1, 4]}) + # The Raft Engine controls ignore the depths, so only the object store points are checked. + plan = bench.build_plan("8", "6000", "1000", "1", smoke=False, configs="R,R0,D,E", + extra_env="GREPTIMEDB_OSWAL_MAX_SEALED_BATCHES=4", sweep="MAX_IN_FLIGHT_CREATES=1,2") + self.assertEqual(len(plan["cells"]), 6) def test_extra_env_and_restart_reach_every_cell(self): for extra in ('{"GREPTIMEDB_OSWAL_MAX_IN_FLIGHT_CREATES": 4, "RUST_LOG": "info"}', @@ -108,6 +112,9 @@ class PlanTest(unittest.TestCase): {"extra_env": "GREPTIMEDB_OSWAL_MAX_IN_FLIGHT_CREATES=8", "sweep": "MAX_SEALED_BATCHES=8"}, {"extra_env": "GREPTIMEDB_OSWAL_RECOVERY_CONCURRENCY=8", "sweep": "RECOVERY_CONCURRENCY=2"}, {"extra_env": "GREPTIMEDB_STANDALONE__STORAGE__BUCKET=other"}, {"extra_env": "NO_VALUE"}, + {"extra_env": "GREPTIMEDB_STANDALONE__WAL__FLUSH_INTERVAL=100ms", "restart": True}, + {"extra_env": "GREPTIMEDB_STANDALONE__WAL__SYNC_WRITE=false"}, + {"extra_env": "GREPTIMEDB_OSWAL_MAX_SEALED_BATCHES=4", "sweep": "MAX_IN_FLIGHT_CREATES=2,3"}, {"extra_env": "A=1\nA=2"}, {"extra_env": '{"A": true}'}, {"extra_env": "1A=x"}, {"extra_env": "GREPTIMEDB_OSWAL_MAX_IN_FLIGHT_CREATES=many"}, {"configs": "R,X"}, {"configs": "D,D"}):