Skip to content

site-build: the image in the execution cache's key; comments re-wrapped - #85

Merged
mmcky merged 1 commit into
mainfrom
site-build/image-in-cache-key
Nov 22, 2026
Merged

mmcky merged 1 commit into
mainfrom
site-build/image-in-cache-key

Conversation

@mmcky

@mmcky mmcky commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

What

The follow-up the review of #84 asked for (the organiser's reviewer, 2026-11-22).

File Change
.github/workflows/site-build.yml the execution cache's key gains the image: jb1-<key>-<tag><env hash>-<packages hash>-<image hash>-<run>, the image hash being the first 16 hex digits of the SHA-256 of the image's /etc/quantecon-container (its name and build time), printed in the step's log; a leg whose image lacks that file fails with an error; the header comments say so, and the lines #84 left past the wrap width are re-wrapped
_base/environment-update.yml one header line re-wrapped; no pin changes
_base/README.md the six series were brought to the baseline, and their --upgrade lines removed, by 2026-11-20; plotly-orca can leave the list in a pull request of its own
sites/README.md the new key

Why the image belongs in the key. Until now a site's cache was keyed on the file its environment hashes and on its extra_packages, not on the image. A new image kept the key, so its pages were not executed again (dp's cache had the same gap, noted in the comments). QuantEcon/actions builds the images only when their Dockerfiles change: build-containers.yml has no schedule, since both Dockerfiles pin their base by digest. So a new build_date means a new image, and the key changes only when the environment does. The last such change was QuantEcon/actions#346 on 2026-11-19, which added Chrome.

Cost. Every site's next build is cold once, intro's and dp's included: about 10 and 30 minutes on ubuntu-latest.

Checks

  • tools/tests: 329 passed, 1 skipped.
  • The workflow parses. No comment line in site-build.yml or _base/environment-update.yml runs past 80 columns.
  • This pull request's own build shows the new key in its run summary.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

The follow-up the review of #84 asked for. A site's
cache was keyed on the file its environment hashes and its
extra_packages, not on the image, so a new image kept the key and its
pages were not executed again (dp's cache had the same gap). The key now
also carries a hash of the image's own /etc/quantecon-container, which
names the image and its build time. The images are built only when
their Dockerfiles change (QuantEcon/actions' build-containers.yml has no
schedule), so a new hash means a new image, not a rebuild of the same
one. A leg whose image lacks the file fails with an error rather than
building with an incomplete key. Every site's next build is cold once.

Also: site-build.yml's comment lines that #84 left past the wrap width
are re-wrapped, as is one line of _base/environment-update.yml's header;
_base/README.md says the series were brought to the baseline, and their
--upgrade lines removed, by 2026-11-20 (and that plotly-orca can leave
the list in a pull request of its own); sites/README.md gives the new key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
Copilot AI adaptive review requested due to automatic review settings November 22, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues blocking approval of the image-aware site execution cache changes.

No open issues 🎉

What changed in this PR

This follow-up to #84 makes site execution caches sensitive to container image changes, so updated images trigger fresh page execution.

Changes:

  • Add a hash of /etc/quantecon-container to cache keys and restore prefixes; fail if the image record is missing or empty.
  • Document the new cache behavior and completed upstream environment alignment.
  • Rewrap workflow and environment comments without changing package pins.
File Description
sites/​README.md Document image-aware cache keys and remaining invalidation limits.
.github/​workflows/​site-build.yml Validate and hash the image record for cache keys; update and rewrap comments.
_base/​README.md Record completed baseline alignment and defer plotly-orca removal.
_base/​environment-update.yml Rewrap header comments; leave package pins unchanged.

Review effort: Balanced (adaptive)

@mmcky
mmcky merged commit bd7aa92 into main Nov 22, 2026
6 checks passed
@mmcky
mmcky deleted the site-build/image-in-cache-key branch November 22, 2026 07:57
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