Redact runtime smoke diagnostics
Dependency Audit / dependency-audit (push) Successful in 1m44s
Deployment Installer / deployment-installer (push) Successful in 7s

This commit is contained in:
2026-08-03 18:36:00 +02:00
parent 313249b8fc
commit 3b3d5b3386
2 changed files with 14 additions and 2 deletions
+9
View File
@@ -105,6 +105,7 @@ def _wait_for(
*,
timeout: float,
container: str | None = None,
redactions: Sequence[str] = (),
) -> None:
deadline = time.monotonic() + timeout
last = ""
@@ -122,6 +123,9 @@ def _wait_for(
timeout=30,
)
detail = _tail(logs.stdout + logs.stderr, limit=8000)
for secret in redactions:
if secret:
detail = detail.replace(secret, "[redacted]")
raise SmokeError(
f"{label} container exited before readiness: "
f"{detail or 'no diagnostic output'}"
@@ -330,6 +334,7 @@ def run_smoke(
),
timeout=timeout,
container=names["postgres"],
redactions=redactions,
)
_wait_for(
"Redis",
@@ -340,6 +345,7 @@ def run_smoke(
),
timeout=timeout,
container=names["redis"],
redactions=redactions,
)
record("managed_dependencies_ready", began)
@@ -447,6 +453,7 @@ def run_smoke(
),
timeout=timeout,
container=names["api"],
redactions=redactions,
)
_run(
(
@@ -506,6 +513,7 @@ def run_smoke(
),
timeout=timeout,
container=names["web"],
redactions=redactions,
)
_run(
("docker", "exec", names["web"], "sh", "-c", "test \"$(id -u)\" = 101"),
@@ -568,6 +576,7 @@ def run_smoke(
),
timeout=timeout,
container=names["worker"],
redactions=redactions,
)
_run(("docker", "stop", "--time", "20", names["worker"]), timeout=30)
record("worker_delivery_and_shutdown", began)