Skip to content

ci: wait for the real server, not the init-time one, before the security gates - #20

Open
pyramation wants to merge 1 commit into
mainfrom
fix/verify-readiness-race
Open

pyramation wants to merge 1 commit into
mainfrom
fix/verify-readiness-race

Conversation

@pyramation

@pyramation pyramation commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The main run for #19 failed its amd64 "Verify PostGIS security (pushed digest)" step with psql: error: connection to server on socket … failed: No such file or directory, so the manifest job was skipped and :18 was not moved to the pgvector 0.8.7 build.

Cause: the step waits with pg_isready -U postgres over the unix socket. The image entrypoint first starts a temporary server for initdb scripts that listens on the socket only, then stops it and starts the real one. The wait can succeed against the temporary server and the first gate script then connects while nothing is running. This race predates #19 (same wait line; it passed on the PR run and lost on the main run).

Fix: wait with pg_isready -h 127.0.0.1, which only the real server answers. Observed locally on postgres-plus:18 while starting a container: socket check ready while TCP check still not ready, then both ready.

Applied to both the PR and pushed-digest verify steps.

Link to Devin session: https://app.devin.ai/sessions/526ad15103ba4700897c0cf7aa8bbdfc
Open in Devin Desktop: https://app.devin.ai/desktop/session/526ad15103ba4700897c0cf7aa8bbdfc?variant=devin
Requested by: @pyramation


🟢 Devin Review found nothing to fix · View findings

Devin Review

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@luxor-code-review

luxor-code-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Bound the pg_isready readiness wait loops (docker.yml:94) — The readiness waits until docker exec postgis-verify pg_isready -h 127.0.0.1 -U postgres -q; do sleep 1; done at .github/workflows/docker.yml:94 and :122 have no retry cap.

The change updates .github/workflows/docker.yml to run the image build, publish it, and verify it by launching a container and probing readiness before running checks.

Files Change
.github/workflows/docker.yml Adds a verify job that starts the built image, waits for Postgres readiness with pg_isready, and runs verification against the running container.
.github/workflows/docker.yml Adjusts readiness probing (e.g. -h 127.0.0.1) so checks do not race container entrypoint init.

One low-severity note: the pg_isready wait loops are unbounded, so a container that never becomes ready can hang the job until the workflow-level timeout.

Reviewed commit: 32fd3e7

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant