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 <fengjiachun@gmail.com>
This commit is contained in:
jeremyhi
2026-10-15 21:38:21 +08:00
parent 8f0f5bcd56
commit 1786397e2d
2 changed files with 12 additions and 3 deletions
+5 -3
View File
@@ -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 ""),
@@ -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"}):