Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

The -W gate is blind in ci.yml, and a warning-only cache failure discards a completed execution

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu bằng cách đọc cache.yml và publish.yml, tập trung vào hai build steps, việc xử lý doctree và bước Upload "_build" folder (cache). Chạy hoặc kiểm tra cache workflow để xác nhận rằng -W build đọc lại các source và build artifact được tải lên khi quá trình thực thi kết thúc với warnings; run vẫn phải báo failure khi thích hợp.

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

Mô tả

Summary

Two independent weaknesses in cache.yml turned a one-line content defect into four days without a usable execution cache, and hid it from the check that should have caught it first.

What happened

Four cache.yml runs failed or were cancelled between 2026-08-20 and 2026-08-24, while the last success was 2026-08-17. The publish build for publish-2026aug24 consequently fell back on the eight-day-old artifact, which shipped a site with inconsistent chapter numbering (filed separately).

The causes were not a single recurring one:

Run Date Cause
32331172292 2026-08-20T04:14Z FileNotFoundError: '_fonts/SourceHanSerifSC-SemiBold.otf' in learning_approximation.md, plus the hoist_failure warning below — fixed by #262
— 2026-08-20T22:56Z hoist_failure warning alone
32433407779 2026-08-21T00:38Z cancelled by hand two minutes in, not a failure
32686259809 2026-08-24T03:23Z hoist_failure warning alone — fixed by #265

The hoist_failure cause was one Sphinx warning promoted to an error by -W: lectures/hoist_failure.md:34: WARNING: Document headings start at H2, not H1 [myst.header]. The stale duplicated frontmatter block left in the body by the #260 resync parsed as body text, and its trailing --- turned the block into a setext H2 ahead of the real # 故障树不确定性.

Both underlying defects were lecture-content defects introduced by translate seed/forward operations, and both are now fixed. What follows is why they cost four days.

Defect 1 — the -W gate never re-reads, so it fires late and in the wrong workflow

cache.yml runs the sphinx-tojupyter build and then the HTML build with -W. Because the doctrees survive between them, the -W step re-reads nothing, so the warning surfaces only on a cold run. The same shape exists in publish.yml, where the rm -r _build/.doctrees line is commented out.

The consequence is that a content defect that should fail a PR's CI instead fails the weekly cold cache build, days later and far from the change that caused it.

Suggested fix: clear _build/.doctrees between the two builds so the -W step re-reads every source. Smallest change with the strongest guarantee. Alternatively drop -W from the tojupyter step and rely on a re-reading HTML step.

Defect 2 — a warning-only failure discards 106 minutes of successful execution

On the 2026-08-24 run, all 142 notebooks executed successfully (142 Executed notebook in lines, zero CellExecutionError) over 1h46m, and the artifact was then thrown away because the upload step does not run on failure.

Suggested fix: add if: success() || failure() to the Upload "_build" folder (cache) step. jupyter-cache does not store failed executions, so the artifact stays correct even when a lecture genuinely errors, and the run's red status remains the signal. This change alone would have made the 2026-08-24 publish a cache hit despite the hoist_failure defect.

Also noted

cache.yml still carries bare apt-get install steps with no timeout-minutes and no retry — the weakness PR #263 would have hardened before it was closed. Not implicated in any of these four failures (apt was green throughout: graphviz 31s, texlive 3m28s), but it remains the open item behind the documented hang class.

Refs: QuantEcon/project-translation#48 (delivery integrity); #262, #265 (the two content fixes); #263 (closed apt hardening).

Ngôn ngữ chính
TeX
Star
5
Fork
4
Merge trung bình
18 giờ 24 phút
Pull request đã merge (30 ngày)
2

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

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. 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/lecture-python.zh-cn

Tất cả issue của QuantEcon/lecture-python.zh-cn

Issue tương tự

Thêm issue về Build System

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.