Skip to content

Retry commit_list on non-200 responses, not just connection errors - #311

Merged
Robbie1977 merged 1 commit into
masterfrom
fix/retry-non-200-commit-list
Sep 22, 2026
Merged

Robbie1977 merged 1 commit into
masterfrom
fix/retry-non-200-commit-list

Conversation

@Robbie1977

Copy link
Copy Markdown
Contributor

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 transient 415 or 502 from a gateway/proxy in front of pdb.virtualflybrain.org — hits rest_return_check, which warns and returns False, and commit_list gave 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_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, which then cascaded into an unguarded None dereference downstream and killed the whole job.

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.
@Robbie1977
Robbie1977 merged commit 9ec2f14 into master Sep 22, 2026
1 of 3 checks passed
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.

2 participants