Compare commits

..

1 Commits

Author SHA1 Message Date
79c652ddd3 test(plausible): psql -q in _register_site — -t does not suppress command tags
All checks were successful
continuous-integration/drone/push Build is passing
psql -tAc still prints INSERT/CREATE command tags (e.g. "INSERT 0 1"), so
_register_site asserted out == site against "INSERT 0 1\nsite" and both
event-tracking roundtrip tests failed on their very first run (build 237 —
the custom tier had never executed before; install always failed earlier).
-q suppresses the tags; verified against the recipe db container.
2026-06-09 22:50:55 +00:00
2 changed files with 2 additions and 8 deletions

View File

@ -384,13 +384,7 @@ def services_converged(domain: str) -> bool:
if proc.returncode != 0:
return False # a service vanished mid-check — not settled
for state in proc.stdout.split("\n"):
# Only ACTIVE states block convergence. 'paused'/'rollback_paused' are terminal-without-
# intervention: swarm's default update-failure-action pauses the update on one task flicker
# and the flag then persists FOREVER (immich CI 241: app service 'paused' from a restart
# during restore, service back at 1/1 and healthy — the wait hung to its deadline). With
# N/N already required above, a paused update is settled for our purposes; the HTTP-health
# and tier assertions still gate whether the app actually works.
if state.strip() in ("updating", "rollback_started"):
if state.strip() not in ("", "completed", "rollback_completed"):
return False
return True

View File

@ -59,7 +59,7 @@ def _register_site(domain: str, site: str) -> None:
f"SELECT domain FROM sites WHERE domain = '{site}';"
)
out = lifecycle.exec_in_app(
domain, ["psql", "-U", "plausible", "-d", "plausible", "-tAc", sql], service="db"
domain, ["psql", "-q", "-U", "plausible", "-d", "plausible", "-tAc", sql], service="db"
).strip()
assert out == site, f"site {site!r} not registered in postgres (got {out!r})"