PR release fails after cleanup reports an existing release as not found

Aperta
#16,565 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, github-actions
Ambito
ci-cd

Direzione di ricerca

Inspect the PR release publisher workflow and the proposed comparison linked in the issue. Run node script/test-pr-release.mjs to exercise the cleanup script’s mocked scenarios, then review the workflow validation and token wiring. Done means cleanup deletes the release found by tag, ignores only a lookup 404, and propagates other lookup or deletion errors.

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

Descrizione

The PR release publisher failed for #14553 after its source CI passed all 4955 tests.

Failing publisher: https://github.com/leanprover/lean4/actions/runs/44381861389/job/135075991655
Source commit: 9b0df8c226237639b7a6add5cce124536a9880a7.

Both tags were pushed successfully. In the cleanup step, both gh release delete commands reported release not found, and their failures were ignored with || true. The next step failed with a release with the same tag name already exists: pr-release-14553.

A separate authenticated REST lookup found the existing short release (ID 450432070), whose asset predates the latest source commit. The SHA-suffixed release pr-release-14553-9b0df8c returned 404. I have not established why the workflow's CLI lookup differed from the separate REST lookup; token visibility, timing, and lookup behavior need to be distinguished.

A proposed patch is available at https://github.com/kernelpanic888/lean4/compare/d15bfa70f721805968efdfc758b202fabb9c8b95...codex/fix-pr-release-rest-cleanup . It replaces cleanup via gh release delete with actions/github-script: get the release directly by tag, delete its exact release ID, ignore only lookup 404, and propagate authorization/server/deletion errors. Artifact validation, the publisher token, and release creation are preserved. No fork code is checked out or executed by the privileged job.

Validation: seven mocked scenarios execute the actual cleanup script extracted from the workflow (both absent/present, either tag absent, lookup 403/500, deletion failure). All pass; YAML parsing, token wiring and git diff --check pass. Run the regression with node script/test-pr-release.mjs. This is a workflow-only change; the Lean compiler was not rebuilt for it.

I am reporting this through an issue first under the external contribution guidelines. If appropriate, please apply the patch or permit a PR, then rerun the failed publisher. Editing the contributor's source PR alone cannot change this default-branch workflow.

AI assistance: OpenAI Codex (Lina) prepared the diagnosis, patch and tests at the author's request.

Lingua principale
Lean
Stelle
10.3k
Fork
1.1k
Merge medio
19h 8m
PR unite (30g)
421

Preparare l'ambiente

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 leanprover/lean4

Tutte le issue di leanprover/lean4

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.