Skip to content
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

feat(cli): add --connect-timeout #1889

Merged
merged 1 commit into from Jun 8, 2022
Merged

feat(cli): add --connect-timeout #1889

merged 1 commit into from Jun 8, 2022

Conversation

abonander
Copy link
Collaborator

@abonander abonander commented Jun 3, 2022

And add a default 10 second connection timeout to all subcommands.

This addresses sporadic "connection refused" errors when using using sqlx-cli in automated jobs that start concurrently with a fresh database instance, such as using a Postgres image as a service in Gitlab CI.

Normally, I'd expect Gitlab to wait for the database container to be ready before proceeding with the build, and their documentation clearly states that this is already being done.

However, it appears that this is not the case for the Kubernetes executor which we're using in a self-managed Kubernetes cluster to speed up CI since builds with Gitlab's shared runners are glacially slow. Thanks to that misleading (or possibly outdated) bit of documentation, I wasted several hours today trying to figure this out.

Given that the above issue has been open for almost a year, I figured it was just easier to address it on our end.

@abonander abonander force-pushed the ab/retry-connect branch 5 times, most recently from 74a8316 to cb6d698 Compare June 3, 2022 19:26
@abonander abonander merged commit 1f91724 into master Jun 8, 2022
@abonander abonander deleted the ab/retry-connect branch June 8, 2022 22:48
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.

None yet

1 participant