Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CI: every job downloads a CPython interpreter, and that download is a recurring single point of failure

Aperta
#320 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
github-actions, python
Ambito
ci-cd, devops

Direzione di ricerca

Inizia con template/.github/workflows/tests.yml.jinja, nightly.yml.jinja e commit-message.yml.jinja, quindi confronta i rispettivi equivalenti in .github/workflows. Esamina ogni occorrenza elencata di uv python install e verifica la matrice completa di Python rispetto agli interpreti forniti dai runner proposti. Il lavoro è completato quando i workflow rimangono in parità e non dipendono più dal download di CPython per questi job.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happens

Every CI job in the template, and therefore in all seven generated projects, begins with a step that downloads a CPython interpreter:

- name: Set up Python
  run: uv python install ${{ matrix.python-version }}

uv python install fetches a build from the astral-sh/python-build-standalone GitHub release. When that download fails, the job dies before running a single test, and the PR goes red for a reason unrelated to its contents.

Over roughly twelve hours on 2026-08-12/13 this failed repeatedly, on main and on four separate pull requests, always at the same step:

error: Failed to install cpython-3.12.12-linux-x86_64-gnu
  Caused by: Request failed after 3 retries
  Caused by: Failed to download https://github.com/astral-sh/python-build-standalone/releases/download/.../cpython-3.12.12+...-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
  Caused by: http2 error
  Caused by: stream error received: refused stream before processing any application logic

It also appeared as 503 Service Unavailable and curl: (56) Connection died. It hit ubuntu, macOS and Windows runners, and every Python version in the matrix. uv already retries three times internally, and that was not enough.

The same outage took out other GitHub release downloads in the same window (the gitleaks install step, and Read the Docs' asdf install uv), so the cause is upstream rather than anything in this repo. The point of this issue is that our workflows put that download on the critical path when they do not have to.

Why it is worth fixing rather than re-running

  • It is not rare. Five re-runs in one session, and each costs a full matrix.
  • It is indistinguishable at a glance from a real failure. Every occurrence needs someone to open the job log and read which step died before they know whether to trust the red.
  • It scales with the fleet: ten uv python install steps in the template's tests.yml alone, times eight repositories.
  • The runner images already ship the interpreters we ask for. actions/setup-python resolves common versions from the runner's tool cache with no network download at all.

Affected files

template/.github/workflows/:

  • tests.yml.jinja — 8 occurrences (lines 56, 91, 136, 193, 223, 252, 325, 358)
  • nightly.yml.jinja — 1 (line 44)
  • commit-message.yml.jinja — 1 (line 52)

and the same shape in this repository's own .github/workflows/{tests,nightly,commit-message}.yml, which must be kept in parity.

Options

  1. actions/setup-python for the interpreter, uv for everything else. Replace the uv python install step with actions/setup-python, and set UV_PYTHON_PREFERENCE=only-system so uv uses it rather than fetching its own. Versions present in the runner tool cache then need no download.
  2. Keep uv python install and add a retry wrapper. Smaller change, but it makes a bad minute into a slow minute rather than removing the dependency, and uv already retries three times.
  3. Do nothing and re-run. The status quo. Worth stating explicitly, because the cost is real but bounded.

Option 1 is the one that removes the failure mode. It also needs care: setup-python and uv python install do not resolve versions identically (patch pinning, free-threaded builds, and versions newer than the runner image differ), so this should be measured on the full matrix before it fans out.

Not in scope

The astral-sh/setup-uv step that installs uv itself, and the pinned # renovate: versions on it. Those are a separate download and have not been the failing step.

Lingua principale
Python
Stelle
5
Fork
1
Merge medio
1g 3h
PR unite (30g)
59

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stateful-y/python-package-copier

Tutte le issue di stateful-y/python-package-copier

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.