Skip to content

[build-tools] Retry transient archive download errors - #4897

Merged
gwdp merged 6 commits into
mainfrom
gwdp/retry-build-archive-http-errors-20261114
Nov 27, 2026
Merged

gwdp merged 6 commits into
mainfrom
gwdp/retry-build-archive-http-errors-20261114

Conversation

@gwdp

@gwdp gwdp commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Why

A transient HTTP 500 while downloading an existing application archive fails the session on the first attempt.

How

Retry HTTP 408, 429, 500, 502, 503, and 504 within the existing six-attempt transfer budget. Honor Retry-After on 429 and 503 with a shared 60-second cooldown budget per download. Parse HTTP dates in UTC.

Report exhausted build-ID downloads as SystemError with the build ID and HTTP status. Keep the response body in the cause for diagnostics and include the HTTP status in retry metrics.

Test Plan

  • On rebased head 3cfc46ea3, 127 focused tests passed under TZ=Asia/Tokyo.
  • Six loopback HTTP checks covered 500, 429, and 503 recovery, an over-budget 429, a 410, and abort during a cooldown. The 429 check verified that the proxy response body stays out of the serialized job error.
  • Build, type checks, lint, and formatting passed locally. CI and Devin passed on the earlier head aa3ee1d74. CI is running on the rebase. Hosted recovery and deployment are unverified.

Authored by Codex for Gabe.

@gwdp

gwdp commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Codex contribution: added archive HTTP retries, bounded 429 and 503 cooldowns, HTTP status labels in retry metrics, and SystemError for exhausted build-ID downloads. Rebased onto e6f7621db. Independent reviews led to honoring Retry-After on 503 and keeping raw HTTP bodies out of public job errors. On 3cfc46ea3, 127 focused tests, six loopback checks, build, type checks, lint, and formatting passed locally.

— Codex

@codecov

This comment has been minimized.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as outdated.

@gwdp
gwdp marked this pull request as ready for review November 15, 2026 03:29
@gwdp
gwdp requested a review from szdziedzic November 15, 2026 03:29

@szdziedzic szdziedzic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good overall. The retry reuses the existing budget, the 5xx body is drained before retrying, aborts during backoff start no new attempt, and 404/410 still fail fast with the UserError. Nothing blocking; a few comments inline.

One question: in the incident that motivated this, which host returned the HTTP 500, www's artifact route or the storage backend? That tells us whether 429 can happen on this path (see the inline comment on the status list).

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp gwdp changed the title [build-tools] Retry transient archive HTTP server errors [build-tools] Retry transient archive download errors Nov 26, 2026
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as outdated.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as outdated.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp
gwdp force-pushed the gwdp/retry-build-archive-http-errors-20261114 branch from aa3ee1d to 3cfc46e Compare November 26, 2026 22:58
@gwdp
gwdp force-pushed the gwdp/retry-build-archive-http-errors-20261114 branch from 3cfc46e to 2f9a615 Compare November 27, 2026 17:18
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

@gwdp
gwdp merged commit 1e323b5 into main Nov 27, 2026
10 checks passed
@gwdp
gwdp deleted the gwdp/retry-build-archive-http-errors-20261114 branch November 27, 2026 17:27
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