Repository navigation
fix(containers): pin the lean image's conda layer to the Anaconda 2026.07 baseline (#222) - #226
Conversation
…6.07 baseline (#222) The lean image pinned only ten packages to the baseline, so the rest re-resolved on every rebuild. The scheduled rebuild on 2026-10-19 moved plotly to 7.x, which exports images only with kaleido>=1, while both images ship kaleido 0.2 on purpose. Every to_image/write_image in the lean image has failed since: the smoke test on quantecon-build (red with no alert) and the lecture matrix's lecture-python-advanced.myst leg, whose lectures also pass engine="kaleido", removed in plotly 7. Pin every package in the file that the anaconda=2026.07 metapackage also pins, at its version (both py313_mkl builds agree), so the lean conda layer matches the full image's: plotly 6.7.0, ipykernel 6.31.0, jupyterlab 4.5.9, notebook 7.5.7, ipywidgets 8.1.7, mkl-service 2.7.2, pip 26.1.2 and Python 3.13.14 move; eight more are pinned where they already resolved. xlrd, graphviz, python-graphviz and lxml are not in the metapackage and stay unpinned. Add the new pins to Dependabot's conda ignore list so it does not propose moving them past the baseline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🔵 Needs a closer look
This change adjusts container image dependency pins that will trigger a rebuild and republish on merge, but because the repo CI does not build/test images pre-merge, runtime validation requires a maintainer to monitor the post-merge container rebuild and downstream smoke/lecture workflows.
No open issues 🎉
What changed in this PR
This pull request fixes a regression in the lean container image (quantecon-build) where Plotly static image export broke after dependency drift (Plotly 7.x becoming incompatible with the intentionally pinned kaleido<1.0). It does this by pinning the lean image’s conda layer to the anaconda=2026.07 baseline, aligning it with the full image.
Changes:
- Pin lean-image conda dependencies in
containers/quantecon-build/environment.ymlto theanaconda=2026.07baseline (notably restoringplotly=6.7.0compatibility withkaleido<1.0). - Extend
.github/dependabot.ymlto ignore updates for newly baseline-pinned conda packages to prevent automated drift. - Update
containers/quantecon-build/README.mdto reflect the actual pinned-to-baseline set. - Add a
CHANGELOG.mdentry under Unreleased → Fixed documenting the Plotly export fix.
| File | Summary |
|---|---|
containers/quantecon-build/README.md |
Updates documentation so the “pinned to baseline” list matches the packages actually pinned after this change. |
containers/quantecon-build/environment.yml |
Pins additional conda packages to the anaconda=2026.07 baseline to prevent rebuild drift (including Plotly/Jupyter stack). |
CHANGELOG.md |
Records the user-visible fix (Plotly export working again in the lean image via baseline pinning). |
.github/dependabot.yml |
Adds newly baseline-pinned conda packages to the ignore list to avoid Dependabot proposing updates past the baseline. |
This pull request is too complex or risky for automated approval.
Review effort: Balanced
Step 0 review before running the handover: - D_REBUILD: #226 pinned the lean image's conda layer to the Anaconda 2026.07 baseline, so only four conda packages, transitive dependencies and the pip floors still re-resolve on a base move. Record #222 as the drift the finding predicted, and the scheduled runs since the review. - T_RESTORE and LOG: PLAN backlog item 18 is now #228. - T_PREVIEW: note that #227 and #230 change the same preview path. - C135: decision 1 on #143 (gate.yml in the canary, no v0-next) tests the sibling chain by a test-time rewrite; the consumer side remains. - C142: the lecture matrix has been red again since 2026-10-12 (#222). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WT8bMZcWbg9TzmmbyjsrUp
…ecisions (#202) Both of #202's triggers have fired: the canary runs preview-cloudflare (QuantEcon/test-actions-lecture-intro#67), and the six consumers that passed `cname` to publish-gh-pages have dropped it. - CONTRIBUTING, Staged Releases: step 2 names both preview deploys, and the known limit about preview-cloudflare is gone. - PLAN: the follow-ups section goes; the canary row gains preview-cloudflare; every exact pin is on v0.12.0. - PLAN P0: 0a-0c describe the decided gate (gate.yml in the canary, candidate checkout, no v0-next, main/v* candidates with environment-scoped secrets, frozen builds, publish-gh-pages deploy only), with #227 as the preview prerequisite. 0a no longer says no fixture covers the #85 path; the container smoke fixture does. - PLAN backlog: items 6, 15 and 18 point at #153, #229 and #228; item 16 is done. - PLAN dependency policy: #226's wider lean-image pin set, and the decided scheduled-rebuild policy (digest-pinned base, Dependabot moves it, weekly schedule dropped). - PLAN dispositions: #143 and #146 decided, #135/#136 re-scoped, #159's close recorded, rows for #222 and #227-#230. - .gitignore: .claude/worktrees/, which `claude --worktree` creates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WT8bMbP4XxZ719EvfUPaJ4
The lean image (
quantecon-build) cannot export plotly figures, and hasn't since its scheduled rebuild on 2026-10-19. That is what keeps #222 red. This PR pins the lean image's conda layer to the Anaconda 2026.07 baseline, so it matches the full image, which is unaffected.What broke
containers/quantecon-build/environment.ymlpinned only ten packages to the baseline. Everything else, plotly included, re-resolved whenever the image was rebuilt. The rebuild on 2026-10-19 was a full one, not a cached replay, and it moved plotly to 7.x. plotly 7 exports images only with kaleido 1.x, while both images shipkaleido<1.0on purpose: kaleido 1.x needs a separately provisioned Chrome, which isn't found in container jobs. plotly 7 also removedto_image'sengineargument. Two signals have been red since:quantecon-buildleg (test-container.yml)RuntimeError: … pip install --upgrade "kaleido>=1"fromplotly/io/_kaleido.py, in the fixture'sto_imagecell (job)lecture-python-advanced.myst · quantecon-buildTypeError: to_image() got an unexpected keyword argument 'engine'inBCG_complete_mkts,BCG_incomplete_mktsandknowing_forecasts_of_others(job)Both legs on the full image passed throughout, on the same commits and the same lecture content. The full image takes plotly 6.7.0 from
anaconda=2026.07.Nobody saw the smoke-test failure, because
test-container.ymlhas no failure alert (see "Not in this PR"). The 2026-10-12 failure on #222 is unrelated: a one-offCellTimeoutErrorinlecture-python-programming'spolars.mdthat has not recurred.Changes
containers/quantecon-build/environment.ymlanaconda=2026.07metapackage also pins is now pinned to the metapackage's version. The comment explains why, and names the four packages the metapackage does not contain (xlrd,graphviz,python-graphviz,lxml), which stay unpinned. The kaleido note no longer says 0.2 "works with current plotly"..github/dependabot.ymlignorelist next to the existing stack, so Dependabot does not propose moving them past the baseline (pythonwas already there).containers/quantecon-build/README.mdCHANGELOG.mdThe full image's files are untouched, so its conda layer stays cached when this rebuilds both images.
Version moves in the lean image
Old is a solve of the previous file on 2026-11-04. The published image was built on 2026-11-02, so it may differ by a patch here and there. New is the
anaconda=2026.07linux-64py313_mklpin, identical in both build revisions (_0,_1).mkl 2025.0.0, jupyter 1.1.1, openpyxl 3.1.5, pytables 3.11.1, h5py 3.16.0, requests 2.34.2, beautifulsoup4 4.15.0 and pyyaml 6.0.3 are pinned at the versions they already resolved to. ipykernel moves back a major version, from 7 to 6, which is what the full image and the lecture repos' own
anaconda=2026.07environments run.jupyterlab 4.5.9 is the case the Dockerfile's Node comment already describes: Node comes from nodejs.org, outside the solve.
What I checked before merge
Nothing in CI builds an image on a PR (#142), and dispatching
build-containers.ymlfrom a branch would push:latest. So the pre-merge evidence is a linux-64 dry-run solve, the method #199 used:CONDA_SUBDIR=linux-64,CONDA_OVERRIDE_GLIBC=2.39for Ubuntu 24.04, conda dependencies only.nest-asyncioreplacesnest-asyncio2(ipykernel 6 and 7 respectively), andjupyter-buildergoes with jupyterlab 4.6. No other package changes, andxlrd,graphviz,python-graphvizandlxmlresolve exactly as before.anaconda 2026.07and plotly 6.7.0. All 26 packages the lean file pins are identical in the two solves.quantecon-book-theme's uninstalleddocextra mentions plotly). So pip leaves plotly 6.7.0 in place, as it does in the full image.Merging: watch the rebuild
Merging rebuilds both images and pushes
:lateststraight away (#142), so merge when someone can watch:build-containers.yml: the lean image re-solves its conda layer. A failure here means the pins and the real runner disagree.test-container.yml(viaworkflow_run): thequantecon-buildsmoke leg should turn green for the first time since 2026-10-19. It files no alert either way, so check it by eye.test-containers-lectures.yml:lecture-python-advanced.myst · quantecon-buildshould turn green. Once the whole matrix is green, 🔴 CI failure: Test Container Builds #222 can be closed by hand.If something goes wrong, reverting this PR puts the lean image back to today's resolution.
Not in this PR
test-container.ymlhas no failure alert, which is why a three-week red went unseen. The other two container workflows have anotify-failurejob. Adding one is a separate workflow change, and it fits containers: no validation runs before the tag every consumer pins moves #142.quantecon-book-theme0.22.1 bump: better merged after this one is green, so the matrix validates one image change at a time.>=floors, andquantecon-book-networksin both images. Pinning all of that is the scheduled-rebuild policy question from the 2026-10-06 review (finding M4 in PR qe: record the 2026-10-06 codebase review (QEP-7) #220, with its follow-ups in qe: handover for the GitHub follow-ups of the 2026-10-06 review (for a local agent to run) #221), and 🔴 CI failure: Test Container Builds #222 does not need it.engine="kaleido"argument is deprecated under plotly 6 as well. Dropping it is a change forlecture-python-advanced.mystitself.Part of #222 and #188.
🤖 Generated with Claude Code