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

Đang mở
#41 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, python
Lĩnh vực
ci-cd, tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
1
Fork
0
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QuantEcon/lectures

Tất cả issue của QuantEcon/lectures

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.