Skip to content

Retry Python downloads longer in CI setup - #8285

Open
denik wants to merge 3 commits into
mainfrom
ci-uv-python-retries
Open

denik wants to merge 3 commits into
mainfrom
ci-uv-python-retries

Conversation

@denik

@denik denik commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Set UV_HTTP_RETRIES=10 on the install-pythons Taskfile task. The CI setup action runs it, and so do bump-sdk-post and the integration tasks that depend on it.

uv python install 3.9 3.10 3.11 3.12 3.13 downloads Python builds from github.com/astral-sh/python-build-standalone release assets. Those downloads sometimes return HTTP 500 for a minute or two. uv's default 3 retries give up within seconds, so every job that hits that window fails during setup. Over 2 days this failed 6 main jobs (Windows and macOS task test) and validate-generated.

I picked more retries over the other options:

  • uv already backs off exponentially between retries, so 10 retries waits several minutes in total. The step stays fast when downloads work.
  • Caching the uv Python dir through the GHA cache would compete with the Go caches for the 10 GB quota (see the comments in this action), and the cache is cold on the first run.
  • Installing fewer versions per job only shrinks the window; acceptance tests use the full range.
  • I found no Python-build mirror that this repo is already set up to use (JFrog only covers PyPI and Go here).

Tests

Locally, with uv 0.8.9 (the version CI pins) and UV_PYTHON_INSTALL_MIRROR pointed at a server that always returns 500:

  • default: fails after 3 retries, about 5s of backoff;
  • UV_HTTP_RETRIES=8: fails after 8 retries, 127s (gaps grow from ~1s to ~49s);
  • UV_HTTP_RETRIES=10: fails after 10 retries, 400s (the jitter makes this vary; the last gaps were 255s and 81s).

So uv 0.8.9 reads the variable for managed-Python downloads, and the longer backoff covers outages of a few minutes.

Dashboard

error/3895: "Setup step failed: Setup build environment", 6 failures on main on 2026-11-30 and 2026-12-01:

error: Failed to install cpython-3.13.6-linux-x86_64-gnu
  Caused by: Request failed after 3 retries
  Caused by: HTTP status server error (500 Internal Server Error) for url (https://github.com/astral-sh/python-build-standalone/releases/download/20250808/cpython-3.13.6%2B20250808-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz)

Gaps and risks

  • Not tested against a real GitHub outage; an outage longer than the backoff still fails the job, just a few minutes later.
  • Risk: low (CI-only env var on one step).

🤖 AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

uv python install fetches builds from GitHub release assets, which
intermittently return HTTP 500. The default 3 retries give up within
seconds; raise UV_HTTP_RETRIES to 10 for the install step.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: a92a3d0

Run: 46854225005

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 60 6 1:45
💚​ aws-windows-latest-4core-16gb 1 60 6 3:05
💚​ azure linux-2core-8gb 1 60 6 1:30
💚​ azure-windows-latest-4core-16gb 1 60 6 2:35
💚​ gcp linux-2core-8gb 1 60 6 1:41
💚​ gcp-windows-latest-4core-16gb 1 60 6 3:07
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:06 gcp-windows-latest-4core-16gb TestAccept
3:04 aws-windows-latest-4core-16gb TestAccept
2:33 azure-windows-latest-4core-16gb TestAccept
@denik
denik marked this pull request as ready for review December 2, 2026 08:43
@denik
denik requested a review from a team as a code owner December 2, 2026 08:43

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at bcdf3df. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) below.

This PR sets UV_HTTP_RETRIES=10 on the setup-build-environment step that runs task install-pythons, so short HTTP 500 outages on python-build-standalone downloads stop failing CI setup. The fix is fine for jobs that use the shared action, but the variable sits on the step rather than on the task. Other entry points (the integration tasks' deps: and bump-sdk-post) still use uv's default 3 retries. There's also a small comment-convention nit.

@Sankalp-Mittal Sankalp-Mittal 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.

[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.

No issues found.

Moves the setting from the setup action step to the Taskfile task, so
the integration tasks and bump-sdk-post that depend on install-pythons
retry too. Links uv's docs for the variable.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik

denik commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 @andrewnester I addressed the two review-oss-bot threads in a92a3d0 (the setting moved from the action step to the install-pythons Taskfile task, and the comment now links uv's docs). Could you re-approve?

AI agent (claude-opus-5-5, isaac_claude)

@Sankalp-Mittal Sankalp-Mittal 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.

[AI Generated] Follow-up review by review-factory (Claude Opus 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.

No new issues found.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants