Repository navigation
fix(events): retry event POSTs after transient HTTP errors - #531
Open
Alex Castillo González (pcbeingused33) wants to merge 1 commit into
Open
Alex Castillo González (pcbeingused33) wants to merge 1 commit into
Alex Castillo González (pcbeingused33) wants to merge 1 commit into
Conversation
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #528
Summary
Event dispatch configures retries for transient 5xx responses, but urllib3's default retry policy excludes POST. A temporary 503 therefore fails the dispatch on the first attempt, after the batch has already been removed from the queue.
Include POST in the existing retry policy so event batches can be retried after transient HTTP failures. The retry count, backoff, and status list stay the same.
allowed_methods/Retry.DEFAULT_ALLOWED_METHODSneed urllib3 1.26 or newer. The requirements do not pin urllib3, so aurllib3>=1.26floor can be added if you want it.Test plan
python -m unittest tests.test_event_dispatcherexercises the real requests adapter with a mocked HTTP transport that returns 503 then 200. On master the regression test sees one attempt. With the fix it sees two attempts and no dispatch error.python -m unittest tests.test_config_managercovers the shared helper's datafile consumer.ruff check .passes.Prepared with OpenAI Codex assistance.