Skip to content

chore: stop running postgres-only tests if DB is not set #18784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Jul 8, 2025

Fixes coder/internal#695

PostgreSQL tests are getting run in a non-postgres CI job because the tests don't get skipped if the DB= env is unset. This PR adds a skip for them.

They are flaking in the test-go-race CI job. They run fine in the test-go-race-pg job, which pre-creates the postgres server, so the flakiness is almost certainly related to spinning up the database server.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis requested a review from hugodutka July 8, 2025 11:47
@spikecurtis spikecurtis marked this pull request as ready for review July 8, 2025 11:47
@@ -93,7 +93,7 @@ func initDefaultConnection(t TBSubset) error {
if !containsAnySubstring(errString, retryableErrSubstrings) {
break
}
t.Logf("failed to connect to postgres, retrying: %s", errString)
t.Logf("%s failed to connect to postgres, retrying: %s", time.Now().Format(time.StampMilli), errString)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added this because it looks like we only retried 3 times, even though we're supposed to wait 10 seconds. Timestamp information will be helpful if we hit it again.

@spikecurtis spikecurtis merged commit bf0271f into main Jul 8, 2025
41 checks passed
Copy link
Contributor Author

Merge activity

@spikecurtis spikecurtis deleted the spike/internal-695-disable-db-tests-without-postgres branch July 8, 2025 11:56
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flake: postgresql connection reset
2 participants