CI: build PRs, key notebook cache on Firedrake version, weekly canary - #4
Merged
Conversation
Owner
Author
|
Added in the second commit: |
The workflow only built on push to main and cached executed notebooks with a key derived solely from requirements.txt. Since the jupyter cache only re-executes notebooks whose code changed, updating the Firedrake image never invalidated the cache: "testing against the latest image" silently reused outputs produced by older Firedrake versions, and PRs were not built at all. - build on pull_request (deploy still only on push to main) - include the Firedrake version reported by the image in the cache key, so an image update re-executes the whole book - weekly scheduled run without the cache as a full-rebuild canary for upstream API changes - upload the error reports also when the build fails (that is when they matter); cancel superseded PR runs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jupyter-book exits 0 even when notebooks fail to execute (only a warning is emitted), so the job was green regardless. The book currently builds with zero warnings, so -W is safe; --keep-going still reports all warnings before failing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hardens the build workflow (item ② of the dev/test plan; companion to #3).
Problems addressed
main, so breakage was discovered after merging.requirements.txt, and the jupyter cache re-executes only notebooks whose code changed — so when the Firedrake image updated, all unchanged notebooks silently reused outputs produced by an older Firedrake. "Testing against the latest image" was largely an illusion (this is exactly how the six failures fixed in Adapt to latest Firedrake image; add docker-based verification build #3 stayed invisible).Changes
pull_requesttrigger: PRs now build the whole book in the latest image; deploy still happens only on push tomain.2026.4.1): an image update invalidates the cache and re-executes every notebook.restore-keysstill allows partial reuse within the same Firedrake version.schedule, Mon 03:00 UTC): runs with the cache step skipped, i.e. a full fresh rebuild — upstream API changes surface as a failed scheduled run instead of blocking your next PR.Notes for review
python3 -c "from importlib.metadata import version; print(version('firedrake'))"— verified against the current image (returns2026.4.1).🤖 Generated with Claude Code