drift-check.yml: the bibliography job goes red when upstream drops a citation with its entry, though the night's refresh settles it

Aperta
#41 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
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, python
Ambito
ci-cd, tooling

Direzione di ricerca

Start with .github/workflows/drift-check.yml around lines 139 and 152, then trace how tools/bib-merge --reconstruct checks citation closure and how the refresh changes the pool. Reproduce the hog_cycle case described in the issue and add a test for a citation removed alongside its bibliography entry. Done means that case no longer makes the nightly bibliography job fail, while genuine closure errors remain detectable.

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

Descrizione

bug

Found by the review of intro's promotion for step 2 of QuantEcon/project-monorepo#24; it predates that promotion. Line numbers are at main 83f0179.

What happens. When a series removes a citation and its bibliography entry in the same commit, the night's check job runs tools/bib-merge --reconstruct (.github/workflows/drift-check.yml:139) against the pool as committed. The pool's copy of the lecture still cites the key, because the refresh has not run yet, while the merged file regenerated from the series' files no longer has it. The closure check fails, bib-merge exits 2, bib_failed is set and the bibliography job goes red (line 152). The same run's refresh opens the pull request that settles it, and the job stays red every night until that pull request merges.

Reproduced on a copy of the pool with intro promoted: with intro's two {cite} of hog_cycle removed from cobweb.md, the entry removed from intro's quant-econ.bib and intro's pin moved, bib-merge prints [closure] hog_cycle: cited by cobweb.md but not in the merged file and exits 2. After tools/promote --refresh --exclude jax and tools/bib-merge --write, it is clean.

Why it matters. A red nightly means stop and look, and step 2 of QuantEcon/project-monorepo#24 prepares each day's promotion only after a green one. Here the red asks for nothing that the refresh's pull request does not already do.

What a fix could be. Judge closure against the pool as the refresh will leave it, or report a key cited only by lectures the same run refreshes as part of that refresh rather than as a failure. Either way, with a test for the case above.

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

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 QuantEcon/lectures

Tutte le issue di QuantEcon/lectures

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.