fix(replay-parse-service): handle plain HTTPError from ballchasing client#743
Closed
ben4643 wants to merge 1 commit into
Closed
fix(replay-parse-service): handle plain HTTPError from ballchasing client#743ben4643 wants to merge 1 commit into
ben4643 wants to merge 1 commit into
Conversation
Member
|
I'm not sure I see the point of this - this is cleaning up error handling for the ballchasing path, which at this point is both not active and fully deprecated. |
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.
Summary
Fixes prod
IndexError: tuple index out of rangeinparseReplayCelery task that made previously-uploaded replays permanently un-parseable._parse_ballchasingassumed ballchasing exceptions hadargs = (response, body)and usede.args[1].python-ballchasingactually raises plainrequests.HTTPErrorfromraise_for_status()—argsis a 1-tuple(message,), soe.args[1]raisesIndexErrorbefore the duplicate-replay (409) fast-path could run. Every retry of an already-uploaded replay then crashed.Changes
_extract_response_and_body(exc)helper — pullsResponseand parsed body offexc.response.e.args[1]/*e.argsreferences in_parse_ballchasingwith(response, body)from the helper..response(e.g.ConnectionError) now re-raise instead of being silently misinterpreted as a known status code.Tests
New
tests/test_ballchasing_error_handling.py:get_replay→ retries, succeeds on second callConnectionError, no.response) → propagates unchangedAll 11 tests pass (4 new + 7 pre-existing).
Test plan
dc357bcc-8bcc-4321-bba4-6b66e261c64b) against staging and confirm noIndexError.