fix(ci): make PG readiness timeout effective#286
Draft
NikolayS wants to merge 2 commits into
Draft
Conversation
The readiness wait in four jobs relied on the exit status of a for-loop, which is that of its last command (sleep 1), so the || timeout branch was dead code and the diagnostic never fired when PostgreSQL failed to start. Replace it with the ready-flag pattern already used by the upgrade, tle, pgcron, and timetable jobs, including a docker logs dump on timeout. https://claude.ai/code/session_01KAaEGkQZmey1D1xCsVGmqv
The File Organization section listed sql/pgque-unpgque.sql, which does not exist. Replace it with the actual top-level files under sql/: pgque_uninstall.sql, pgque-tle.sql, and pgque-tle-uninstall.sql. https://claude.ai/code/session_01KAaEGkQZmey1D1xCsVGmqv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Four jobs in
.github/workflows/ci.yml(test matrix, python-client, go-client, ts-client) waited for PostgreSQL with:A
forloop's exit status is that of the last command it ran. When PG never becomes ready, the last command issleep 1, which exits 0 — so the||branch is dead code: the job proceeds silently with PG down instead of failing fast with the timeout diagnostic.Additionally, CLAUDE.md's File Organization section listed
sql/pgque-unpgque.sql, which does not exist in the repo (separate commit).Fix
docker logs <container>dump on timeout. Container names, users, andpg_isreadyoptions are unchanged; only the wait logic changed.sql/pgque-unpgque.sqlentry with the actual top-level files undersql/(pgque_uninstall.sql,pgque-tle.sql,pgque-tle-uninstall.sql).Local verification
The fixed wait logic was extracted verbatim into a script with a stubbed
dockerfunction (loop shortened to 3 iterations / 0.1 s sleeps for the test):The fixed logic exits 1 with the diagnostic after the loop when PG never becomes ready, and exits 0 promptly on success; the old logic exited 0 even on total failure.
actionlintis not installed in this environment, so it was not run; the workflow YAML was sanity-parsed with PyYAML (YAML parses OK).Addresses finding D1 and the stale CLAUDE.md entry of #283
https://claude.ai/code/session_01KAaEGkQZmey1D1xCsVGmqv
Generated by Claude Code