Skip to content

fix(dependencies): Retry transient GitHub errors when downloading dependencies - #330

Merged
joshuarli merged 1 commit into
mainfrom
fix/retry-transient-zip-download-errors
Oct 14, 2026
Merged

joshuarli merged 1 commit into
mainfrom
fix/retry-transient-zip-download-errors

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Since #314 switched dependency fetching to GitHub zipball downloads, _fetch_dependency has skipped retries for every HTTPError. GitHub's API sometimes returns 5xx, so a single blip fails devservices up right away. Because the cause is swallowed, all CI shows is DependencyError: sentry-shared-redis (...) on main.

This recently blocked getsentry-frontend deploys. On 2026-10-14, between 16:07:01 and 16:07:11Z, about a dozen sentry CI runners got HTTP Error 500 from the zipball endpoint at the same time. One of them failed acceptance (0) on getsentry/sentry (job). The same issues also show sporadic 503s and 504s over the last month.

Changes:

  • Retry 5xx and 429 responses. Other HTTP errors (404/401/403) still fail immediately, since retrying won't fix them. 403 rate limits are left alone on purpose: a few seconds of backoff won't reset the quota.
  • Make the retries exponential: 5 attempts with 1, 2, 4 and 8s waits (about 15s total), so a short outage gets ridden out. retry() gets an opt-in backoff multiplier; the default of 1.0 keeps current behavior for other callers.
  • DependencyError now includes its cause, for example ... on main (HTTPError: HTTP Error 500: Internal Server Error), so the real failure shows up in CI logs. This also changes the Sentry event message for this error.

Fixes #182
Fixes DEVSERVICES-EE
Fixes DEVSERVICES-E5
Fixes DEVSERVICES-FK

Sentry issues:

via @joshuarli.

--

View Junior Session [Sentry]

…endencies

GitHub's zipball API intermittently returns 5xx, which devservices
never retried, failing devservices up (and sentry CI) on the first blip.
Retry 5xx and 429 with exponential backoff, and include the underlying
cause in the DependencyError message so failures are diagnosable.

Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
@joshuarli
joshuarli merged commit 31958dc into main Oct 14, 2026
18 checks passed
@joshuarli
joshuarli deleted the fix/retry-transient-zip-download-errors branch October 14, 2026 16:57
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.

could use a better error message for DependencyError

1 participant