Repository navigation
Retry commit_list on non-200 responses, not just connection errors - #311
Merged
Merged
Conversation
Previously a ConnectionError (dropped socket) already got 3 retries with exponential backoff (2/4/8s), but a request that came back with a bad HTTP status (e.g. a transient 415 or 502 from a gateway/proxy in front of pdb.virtualflybrain.org) hit rest_return_check, which just warns and returns False, and commit_list gave up on the first attempt. This applies the same backoff-and-retry to that path, so a transient gateway blip gets the same chances to clear as a dropped connection before commit_list finally returns False. Seen in production: VFB_reporting_results' scheduled "Create Reports" workflow failed on 2026-09-19 and 2026-09-22 when a single Cypher query in the content report generator hit a 415 then a 502 from pdb.virtualflybrain.org and commit_list returned False immediately.
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.
commit_list()already retries with exponential backoff (2/4/8s) when the connection itself drops (requests.exceptions.ConnectionError), but a request that comes back with a bad HTTP status — e.g. a transient415or502from a gateway/proxy in front ofpdb.virtualflybrain.org— hitsrest_return_check, which warns and returnsFalse, andcommit_listgave up on the very first attempt.This applies the same backoff-and-retry to that path, so a transient gateway blip gets the same chances to clear before
commit_listfinally returnsFalse.Seen in production:
VFB_reporting_results' scheduled "Create Reports" workflow failed on 2026-09-19 and 2026-09-22 when a single Cypher query in the content report generator hit a415then a502frompdb.virtualflybrain.organdcommit_listreturnedFalseimmediately, which then cascaded into an unguardedNonedereference downstream and killed the whole job.