Skip to content

ci(rust): wait for CI Postgres readiness + retry integration tests on transient DB flake#150

Open
BryanFRD wants to merge 1 commit into
mainfrom
fix/reusable-rust-integration-db-flake
Open

ci(rust): wait for CI Postgres readiness + retry integration tests on transient DB flake#150
BryanFRD wants to merge 1 commit into
mainfrom
fix/reusable-rust-integration-db-flake

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Problem

The integration job in reusable-ci-rust.yml flakes ~50% on main (FerrLabs-Cloud idor_scoping panics at Pool<Postgres> init). createdb on the shared postgres-ci pod succeeds, then the test's pool connect intermittently fails — the pod briefly refuses connections under concurrent CI load. The tests are deterministic; only the DB setup flakes.

Fix

  1. Readiness wait after createdbpg_isready loop until the fresh DB accepts a connection before handing it to the tests.
  2. Retry the cargo test integration step up to 3× — a transient connection flake retries instead of failing the build; a genuine regression still fails all three attempts.

Both are contained to the integration job. Applies to every repo that consumes this reusable workflow (all product Rust APIs). YAML validated.

Closes #149.

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.

Flaky Rust integration tests: transient DB-connection panic against shared postgres-ci

1 participant