CI: il PostgreSQL dei test non si riavvia più a metà della suite #99

Merged
Alby96 merged 6 commits from ci-postgres into main 2026-11-15 16:27:30 +01:00
6 Commits
Author SHA1 Message Date
Alby96andClaude Opus 5.5 63ae9d580a Merge main into ci-postgres (refs #98)
ci / test (postgres) (push) Successful in 4m8s
ci / test (sqlite) (push) Successful in 5m16s
ci / test (postgres) (pull_request) Successful in 3m44s
ci / test (sqlite) (pull_request) Failing after 5m38s
ci / image (pull_request) Skipped
ci / image (push) Successful in 1m6s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:59:26 +01:00
Alby96andClaude Opus 5.5 74809068af Turn off disk syncs on the CI test PostgreSQL (refs #98)
ci / test (postgres) (push) Successful in 3m13s
ci / test (sqlite) (push) Successful in 4m23s
ci / test (postgres) (pull_request) Successful in 3m41s
ci / test (sqlite) (pull_request) Successful in 4m28s
ci / image (push) Successful in 1m46s
ci / image (pull_request) Successful in 1m1s
With the restarts gone, a rerun still failed 7 tests on read timeouts. The
server log shows why: every DROP DATABASE of the tests forces an immediate
checkpoint, one at a time, and on the runner's disk the sync alone took up
to 37 seconds, so queued drops passed the client's 30-second timeout. The
service is a throwaway, so initdb now sets fsync, synchronous_commit and
full_page_writes off. docker-compose.yml and real databases keep them on.
ADR 0015 updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:27:48 +01:00
Alby96andClaude Opus 5.5 73f2345047 Back to the normal CI jobs after the stress run (refs #98)
ci / test (sqlite) (push) Successful in 4m34s
ci / test (sqlite) (pull_request) Successful in 4m56s
ci / test (postgres) (push) Failing after 9m37s
ci / image (push) Skipped
ci / test (postgres) (pull_request) Successful in 8m44s
ci / image (pull_request) Successful in 1m21s
Reverts the temporary three-round job. With --init and the shorter pg_isready,
three PostgreSQL suites on one server passed with no restart (run 321), where
the same run without them restarted the server four times (run 315). The
Docker events in the service log step stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:25:59 +01:00
Alby96andClaude Opus 5.5 6ea303e1dc Run the test PostgreSQL behind an init and let pg_isready give up before Docker (refs #98)
ci / test (postgres) (pull_request) Skipped
ci / image (pull_request) Waiting for needed jobs
ci / test (postgres) (push) Successful in 23m7s
ci / image (push) Skipped
The server log of a failing job shows every restart as 'untracked child
process exited with exit code 2'. A health check that outlives its 3-second
timeout leaves pg_isready to PostgreSQL, which is PID 1 in its container;
when pg_isready exits the postmaster takes it for a crashed backend and
restarts every connection. --init reaps such orphans, and pg_isready -t 5
under a 15-second timeout is never cut off. Same change in docker-compose.yml.
ADR 0015.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:03:44 +01:00
Alby96andClaude Opus 5.5 72f4cbe0a5 TEMPORARY: run the PostgreSQL suite three times on one server, push only (refs #98)
ci / test (postgres) (pull_request) Skipped
ci / image (pull_request) Waiting for needed jobs
ci / test (postgres) (push) Failing after 11m1s
ci / image (push) Skipped
Two clean runs did not show the restart. This collects the server log of a
failure sooner and lists Docker's events for the service container (oom, kill,
die). Reverted before the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 12:13:47 +01:00
Alby96andClaude Opus 5.5 0a9a8a38ec Print the PostgreSQL service log at the end of the CI job (refs #98)
ci / test (postgres) (push) Successful in 8m16s
ci / test (sqlite) (push) Successful in 5m16s
ci / test (postgres) (pull_request) Successful in 11m38s
ci / test (sqlite) (pull_request) Successful in 4m58s
ci / image (push) Successful in 1m42s
ci / image (pull_request) Successful in 47s
The job log shows the tests losing every connection but not why the server
went into recovery. A new tasks command reads the service container's log,
state and memory through the Docker socket the runner mounts in the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:41:31 +01:00