Repository navigation
ci: cache embedded postgres binaries in flake checks - #26986
Merged
Merged
Conversation
The flake-go job runs TestServer subtests that boot coder server with built-in PostgreSQL up to 35 times. Each iteration used a fresh per-test config root, so every run re-downloaded the embedded Postgres binary archive from Maven. Maven rate-limits the shared runner egress IPs, returning non-200 responses that fail all 10 startup retries with "no version found matching 13.21.0". Make startBuiltinPostgres honor EMBEDDED_PG_CACHE_DIR as the archive cache path in test runs, and wire the existing embedded-pg cache actions into flake-go.yaml so all iterations share one download, usually restored from the actions cache.
ibetitsmike
approved these changes
Jul 6, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
flake-go keeps failing every
TestServersubtest that bootscoder serverwith built-in PostgreSQL (example run) withno version found matching 13.21.0, which is embedded-postgres's error for any non-200 while downloading the Postgres binary archive from Maven. The archive gets cached under the server's config root, which is a fresh temp dir in every test, so withtest-count: 35one flake run downloads it dozens of times and Maven rate-limits the runner. Using an external Postgres (like coder/terraform-provider-coderd#370 did) would defeat the point, since these subtests exist to exercise the built-in Postgres path.Instead,
startBuiltinPostgresnow honorsEMBEDDED_PG_CACHE_DIRas the archive cache path (test runs only, data/runtime dirs stay per-test), and flake-go.yaml wires in the existingembedded-pg-cacheactions the same way the Windows/macOS lanes in ci.yaml already do. All iterations then share a single download, and usually zero once the actions cache is warm. The upload step only saves onmain.