- Notifications
You must be signed in to change notification settings - Fork927
chore: retry postgres connection on reset by peer in tests#18632
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
abc4510
to5c7efe5
CompareI believe a much simpler fix is this:#18423. |
That assumes that "reset by peer" can only happen if there is already a Docker container with the name we expect starting on the port. If it uses a different name, or a non-Dockerized postgres is responsible for "reset by peer" then starting the container will fail due to port conflict, no? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We talked about it on Zoom and reached the conclusion that it's a good practice to handle retriable and non-retriable errors separately.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Hugo Dutka <hugo@coder.com>
f0251df
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixescoder/internal#695
Retries initial connection to postgres in testing up to 3 seconds if we see "reset by peer", which probably means that some other test proc just started the container.