Skip to content

fix(containers): pin the lean image's conda layer to the Anaconda 2026.07 baseline (#222) - #226

Merged
mmcky merged 1 commit into
mainfrom
fix/222-lean-image-baseline-pins
Nov 4, 2026
Merged

mmcky merged 1 commit into
mainfrom
fix/222-lean-image-baseline-pins

Conversation

@mmcky

@mmcky mmcky commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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.yml pinned 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 ship kaleido<1.0 on purpose: kaleido 1.x needs a separately provisioned Chrome, which isn't found in container jobs. plotly 7 also removed to_image's engine argument. Two signals have been red since:

Signal Since Error
Smoke test, quantecon-build leg (test-container.yml) 2026-10-19, three runs RuntimeError: … pip install --upgrade "kaleido>=1" from plotly/io/_kaleido.py, in the fixture's to_image cell (job)
Lecture matrix, lecture-python-advanced.myst · quantecon-build 2026-10-19, three runs TypeError: to_image() got an unexpected keyword argument 'engine' in BCG_complete_mkts, BCG_incomplete_mkts and knowing_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.yml has no failure alert (see "Not in this PR"). The 2026-10-12 failure on #222 is unrelated: a one-off CellTimeoutError in lecture-python-programming's polars.md that has not recurred.

Changes

File Change
containers/quantecon-build/environment.yml Every package in the file that the anaconda=2026.07 metapackage 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.yml The 15 newly pinned packages join the conda ignore list next to the existing stack, so Dependabot does not propose moving them past the baseline (python was already there).
containers/quantecon-build/README.md The "pinned to the baseline" list already named jupyter, jupyterlab and ipywidgets, which were not pinned until now. It now lists what is.
CHANGELOG.md Entry under Unreleased → Fixed.

The 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.07 linux-64 py313_mkl pin, identical in both build revisions (_0, _1).

Package Old New
plotly 7.1.0 6.7.0
ipykernel 7.3.0 6.31.0
jupyterlab 4.6.4 4.5.9
notebook 7.6.3 7.5.7
ipywidgets 8.1.9 8.1.7
mkl-service 2.9.0 2.7.2
pip 26.2.2 26.1.2
python 3.13.18 3.13.14

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.07 environments 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.yml from 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.39 for Ubuntu 24.04, conda dependencies only.

  • The new lean environment solves, to 318 packages. Against the old file's 319, exactly the eight versions above move. Two packages swap as a consequence: nest-asyncio replaces nest-asyncio2 (ipykernel 6 and 7 respectively), and jupyter-builder goes with jupyterlab 4.6. No other package changes, and xlrd, graphviz, python-graphviz and lxml resolve exactly as before.
  • The full image solves to 504 packages, with anaconda 2026.07 and plotly 6.7.0. All 26 packages the lean file pins are identical in the two solves.
  • The pip layer cannot undo the pin. None of its eleven packages requires plotly or kaleido, according to their PyPI metadata (only quantecon-book-theme's uninstalled doc extra 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 :latest straight away (#142), so merge when someone can watch:

  1. build-containers.yml: the lean image re-solves its conda layer. A failure here means the pins and the real runner disagree.
  2. test-container.yml (via workflow_run): the quantecon-build smoke leg should turn green for the first time since 2026-10-19. It files no alert either way, so check it by eye.
  3. test-containers-lectures.yml: lecture-python-advanced.myst · quantecon-build should 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

Part of #222 and #188.

🤖 Generated with Claude Code

…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>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 07:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to the anaconda=2026.07 baseline (notably restoring plotly=6.7.0 compatibility with kaleido<1.0).
  • Extend .github/dependabot.yml to ignore updates for newly baseline-pinned conda packages to prevent automated drift.
  • Update containers/quantecon-build/README.md to reflect the actual pinned-to-baseline set.
  • Add a CHANGELOG.md entry 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

@mmcky
mmcky merged commit 1429ac0 into main Nov 4, 2026
30 checks passed
@mmcky
mmcky deleted the fix/222-lean-image-baseline-pins branch November 4, 2026 10:11
mmcky added a commit that referenced this pull request Nov 4, 2026
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
mmcky added a commit that referenced this pull request Nov 4, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants