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

webhook: Retry OSError on queue connection failure #636

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Dec 17, 2024

Commit 06c2717 introduced a retry loop for connecting to AMQP, as
these two containers start at the same time in the OpenShift deployment.

However, these days the webhook often fails with ssl.SSLEOFError
(with parents SSLError and OSError), which doesn't fit AMQPError.
So intercept this as well.

With that we can revert the static sleep from commit 169b53b
again.

Fixes #635


Import ordering, docstrings, and canonical logging statements.
Commit 06c2717 introduced a retry loop for connecting to AMQP, as
these two containers start at the same time in the OpenShift deployment.

However, these days the webhook often fails with `ssl.SSLEOFError`
(with parents `SSLError` and `OSError`), which doesn't fit `AMQPError`.
So intercept this as well.

With that we can revert the static sleep from commit 169b53b
again.

Fixes #635
Copy link
Member

@jelly jelly left a comment

Choose a reason for hiding this comment

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

Thanks

@martinpitt
Copy link
Member Author

Rebuilt, tested locally, deployed, works ✔️

@martinpitt martinpitt merged commit 2bf1fe7 into main Dec 17, 2024
3 checks passed
@martinpitt martinpitt deleted the webhook-start branch December 17, 2024 09:05
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.

amqp/webhook startup race
2 participants