PR previews: the Colab job's Netlify deploy replaces the site build's preview link

未關閉
#879 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
半天
新手友好度
42/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
github-actions, jupyter-notebook, python
領域
ci-cd, devops

研究方向

Start with .github/workflows/ci.yml and .github/workflows/collab.yml, comparing their "Preview Deploy to Netlify" steps that use nwtgck/[email protected]. The fix is either to remove the deploy from collab.yml while keeping its execution report upload, or to separate the two deploys with the action's alias, enable-pull-request-comment and enable-commit-status inputs. Done means a pull request shows one preview link that points at the site build, which you can check on a test pull request. Maintainers may move these workflows to QuantEcon/actions, so confirm the plan with them first.

由索引模型根據 Issue 內容生成。

描述

Two workflows deploy each pull request to the same Netlify site, and whichever finishes last decides where the pull request's preview link points. On recent pull requests that is often the Google Colab execution test, not the site build.

What happens

ci.yml builds the site in the conda environment from environment.yml. collab.yml runs the lectures in the Google Colab runtime image (us-docker.pkg.dev/colab-images/public/runtime:latest), where Python lives under /usr/local. Both end with a "Preview Deploy to Netlify" step using nwtgck/[email protected], with the same site, token and deploy message. The action edits a single bot comment on the pull request ("Deployed on …") and sets the "Netlify" commit status, so the job that deploys second overwrites the first one's link.

Example: #876 at 6280118

Workflow Run Finished Deploy Environment
ci.yml (site build) 45076122134 22:16:19Z https://6b0369a8910b5ccf5ef38079--taupe-gaufre-c4e660.netlify.app conda env, pandas 3.0.3
collab.yml (Colab test) 45076122190 22:17:00Z https://6b0369d04c86ffa2183b9eda--taupe-gaufre-c4e660.netlify.app Colab image, pandas 2.2.3, yfinance 0.2.66

The bot comment was updated to the Colab deploy at 22:16:54Z on 2026-11-22, and the "Netlify" status points there too.

What a reviewer then sees on fitting_distributions is the Colab build:

  • a yfinance FutureWarning that the live site doesn't have;
  • pandas 2 display formatting;
  • last-digit float differences.

None of these comes from the pull request. Against the site build's preview, the live site's fitting_distributions and inflation_history differ only by the pull request's own changes, and all 26 figures on those pages are byte-identical.

Possible changes

  • Deploy only from ci.yml, and have collab.yml keep uploading its execution reports without deploying.
  • Or keep the Colab deploy but separate it. actions-netlify v4.0 has inputs for this: alias, enable-pull-request-comment, enable-commit-comment and enable-commit-status.

Status

This may not be fixed here, because the plan is likely to move the lecture repositories' workflows to QuantEcon/actions (mmcky, 2026-11-23). It is recorded so the move keeps one preview link per pull request, and so reviewers know the current link can show the Colab build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMYDDNE7ziutLwZmeMX

主要語言
Jupyter Notebook
星號
71
分支
37
平均合併
13 小時 9 分鐘
30 天內合併 PR
8

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

QuantEcon/lecture-python-intro 的其他 Issue

查看 QuantEcon/lecture-python-intro 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。