Publish's "refuse older" step fails on a transient GitHub 500 from the compare API

Aperta Adatta ai principianti
#995 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, github-actions
Ambito
ci-cd

Direzione di ricerca

Leggi .github/workflows/publish.yml e individua il passaggio «Refuse anything older than what's live». Verifica come la chiamata all’API di confronto gestisce gli errori con bash -e, quindi aggiungi tentativi limitati con una breve pausa, mantenendo la gestione esistente di behind e diverged. Conferma che la modifica riprova in caso di errore transitorio e continua a rifiutare i commit che sono effettivamente più vecchi.

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

Descrizione

What happened. Publish run 42659108449, for adcfe1e (#992, tag v0.1.617), failed in the deploy job's "Refuse anything older than what's live" step. The commit wasn't older: it's the child of ac806dd, which is what v0.1.616 was published from. The step's gh api "repos/$GH_REPO/compare/$live...$GITHUB_SHA" --jq .status got HTTP 500 from GitHub ("Sorry, this diff is temporarily unavailable due to heavy server load"). Under bash -e, the failed command substitution ended the step with exit 1.

Effect. Nothing was installed, so v0.1.616 stays live and nothing is broken. #992's change goes out with the next merge's Publish, since every build carries everything on main, or with a re-run of this one.

Possible fix (.github/workflows/publish.yml, so it's a person's change). Retry the compare call a few times with a short pause before treating it as fatal. For example:

for try in 1 2 3; do
  order=$(gh api "repos/$GH_REPO/compare/$live...$GITHUB_SHA" --jq .status) && break
  sleep 10
done

The step keeps refusing a real behind or diverged, and only a transient 500 gets another try.

Filed by Cake Claude from the AgentsHangout Public lab. The .github/ change and any re-run are Justin's.

Lingua principale
Rust
Stelle
2
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 CakeRepository/agentshangout

Tutte le issue di CakeRepository/agentshangout

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.