PR previews show main's cached pages instead of the pull request's changes
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
- 1-2 ngày
- Mức phù hợp với người mới
- 53/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, github-actions, yaml
- Lĩnh vực
- ci-cd
Hướng nghiên cứu
Read ci.yml and compare its “Clear stale Sphinx environment” step with the corresponding step in publish.yml; the issue identifies the missing _build/html cleanup and gives the intended command. Check how the preview links are configured in Netlify and the CI workflow, then validate on a PR that edits an existing lecture: its preview should show the change and each PR should have one working preview link.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
A pull request's Netlify preview does not show the pull request's changes to an existing lecture. The Build HTML step in ci.yml writes a page only when that lecture has no page in the downloaded build cache, so every other page in the preview is the cached copy built from main.
Evidence from #304, which changed var_dmd.md and measurement_models.md:
- Its CI run (Actions run 39720429073) wrote six pages:
gallant_tauchen,intro,lq_mean_field_games,lucas_prescott_investment,optimal_growth_uncertaintyandsocial_security_depletion. Neither changed lecture was among them. - On the preview it deployed,
var_dmd.htmlcontains 113 of the 114 phrases the PR removed and 6 of the 154 it added. The page shows the old translation.
#305's preview of sir_model looked right only by coincidence. Its run did not rewrite that page either, but the cache predated #302, so it already held the wording #305 restored.
Cause
The Clear stale Sphinx environment step removes _build/.doctrees but leaves the cached _build/html. The notebook build then reads every source and saves the shared Sphinx environment, so the HTML build reads nothing (updating environment: 0 added, 0 changed, 0 removed) and writes a page only if its source file is newer than the cached HTML file. The cache is unpacked after checkout, so the cached HTML always looks newer.
publish.yml does not have this problem. Its clear step removes both directories, and the publish-2026oct22 run wrote all 150 pages.
What to change
- In
ci.yml, make the clear step remove_build/htmlas well, matchingpublish.yml:
- name: Clear stale Sphinx environment
shell: bash -l {0}
run: rm -rf _build/.doctrees _build/html
The execution cache (_build/.jupyter_cache) is kept, so no notebook re-executes. The HTML step then writes all 150 pages.
-
Remove the second, broken preview link. Netlify's own app also comments on each PR ("Deploy Preview for astonishing-narwhal-a8fc64 ready!"), and its
deploy-preview-Nlink returns 404 (checked 2026-10-23 on #304 and #305). The working preview is the latergithub-actionscomment ("🚀 Deployed on …"). Turn off deploy previews for this site in Netlify's settings, so the CI deploy is the only one. -
Optional: replace
nwtgck/actions-netlifywithquantecon/actions/[email protected], as QuantEcon/lecture-python-programming.fr does. It posts a stablepr-NURL and a link to each lecture the PR changes, which is the page a reviewer opens. It needspull-requests: writeon the job and a Node setup step, as in the frci.yml. On QuantEcon/lecture-python-programming.fr#94 its preview shows the PR's text.
Done when
- A PR that edits an existing lecture shows the edited text in its preview, checked on one PR.
- Each PR carries one preview link, and it works.
- Ngôn ngữ chính
- TeX
- Star
- 5
- Fork
- 4
- Merge trung bình
- 6 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 20
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của QuantEcon/lecture-python.zh-cn
-
Phase 2 tidy-up: revert intersphinx-qualified references once their target lectures are translatedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
QuantEcon/lecture-python.zh-cn#173 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
QuantEcon/lecture-python.zh-cn#306 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The -W gate is blind in ci.yml, and a warning-only cache failure discards a completed executionĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
QuantEcon/lecture-python.zh-cn#271 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
QuantEcon/lecture-python.zh-cn#268 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
QuantEcon/lecture-python.zh-cn#267 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của QuantEcon/lecture-python.zh-cn
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
linuxserver/docker-bookstack#302 · 1 bình luận ·
-
Chart: a failed venv install is marked ready, and the 10Gi venv PVC is too small for itCó thể đã có người làm @andyne13 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
canonical/jimm-k8s-operator#203 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Dome-Works/DOME#128 ·
Maintainer thường phản hồi trong vòng 1 ngày