From 2846cae118e33d2f90bf974a7c6cec502ea0c23c Mon Sep 17 00:00:00 2001 From: Alexey Bodanyuk <144894236+wfa22@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:34:43 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20collect=5Fevidence=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B0=D1=91=D1=82=20make=20=D0=B8=D0=BD=D1=82?= =?UTF-8?q?=D0=B5=D1=80=D0=BF=D1=80=D0=B5=D1=82=D0=B0=D1=82=D0=BE=D1=80=20?= =?UTF-8?q?=D0=B1=D0=B5=D0=B7=20=D0=BF=D1=80=D0=BE=D0=B1=D0=B5=D0=BB=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B2=20=D0=BF=D1=83=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- scripts/collect_evidence.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/collect_evidence.py b/scripts/collect_evidence.py index 76caf34..e7ffe85 100644 --- a/scripts/collect_evidence.py +++ b/scripts/collect_evidence.py @@ -26,6 +26,9 @@ WINDOWS = os.name == "nt" HOOK = ".cmd" if WINDOWS else ".sh" PYTHON = sys.executable VENV_PY = str(ROOT / ".venv" / ("Scripts/python.exe" if WINDOWS else "bin/python")) +# Makefile recipes use $(PYTHON) unquoted: pass interpreters WITHOUT spaces in the path. +MAKE_PY = "python" if WINDOWS else "python3" +MAKE_VENV = ".venv/Scripts/python.exe" if WINDOWS else ".venv/bin/python" ENV = {**os.environ, "PYTHONUTF8": "1"} if WINDOWS: ENV["PATH"] = ENV["PATH"] + os.pathsep + r"C:\Program Files\Git\usr\bin" @@ -101,14 +104,14 @@ def main() -> int: # 2. make check / validate / test log = Log("make-check-validate-test.txt", "make check, make validate (venv), make test") - log.run([make, "check", f"PYTHON={PYTHON}"], shown="make check") - log.run([make, "validate", f"PYTHON={VENV_PY}"], shown="make validate PYTHON=.venv/python") - log.run([make, "test", f"PYTHON={PYTHON}"], shown="make test") + log.run([make, "check", f"PYTHON={MAKE_PY}"], shown="make check") + log.run([make, "validate", f"PYTHON={MAKE_VENV}"], shown=f"make validate PYTHON={MAKE_VENV}") + log.run([make, "test", f"PYTHON={MAKE_PY}"], shown="make test") # 3. persistence with states before/after log = Log("test-persistence.txt", "make test-persistence: restart of LB, all API replicas, PostgreSQL, Valkey") log.note("Containers BEFORE:\n" + "\n".join(states())) - log.run([make, "test-persistence", f"ACTION_SCRIPT=scripts/restart{HOOK}", f"PYTHON={PYTHON}"], + log.run([make, "test-persistence", f"ACTION_SCRIPT=scripts/restart{HOOK}", f"PYTHON={MAKE_PY}"], shown=f"make test-persistence ACTION_SCRIPT=scripts/restart{HOOK}") log.note("Containers AFTER (new pid/started for lb, api-*, postgres, valkey; volumes kept):\n" + "\n".join(states())) log.run([PYTHON, "scripts/lbctl.py", "wait-up", "2"]) @@ -119,7 +122,7 @@ def main() -> int: for attempt in range(1, 7): before = {r for r in states() if "-api-" in r and " running " in r} log.note(f"--- run {attempt}; running API replicas BEFORE:\n" + "\n".join(sorted(before))) - log.run([make, "test-failover", f"ACTION_SCRIPT=scripts/stop-one{HOOK}", f"PYTHON={PYTHON}"], + log.run([make, "test-failover", f"ACTION_SCRIPT=scripts/stop-one{HOOK}", f"PYTHON={MAKE_PY}"], shown=f"make test-failover ACTION_SCRIPT=scripts/stop-one{HOOK}") after = states() gone = [r for r in after if "-api-" in r and " exited " in r]