Skip to content

publish_docs: skip notebook execution for tag builds - #1323

Draft
hschilling wants to merge 1 commit into
OpenMDAO:mainfrom
hschilling:fix-publish-docs-skip-notebook-execution
Draft

hschilling wants to merge 1 commit into
OpenMDAO:mainfrom
hschilling:fix-publish-docs-skip-notebook-execution

Conversation

@hschilling

Copy link
Copy Markdown
Member

Problem

workflow_dispatch runs of publish_docs.yml for historical tags (e.g. v1.0.0) fail during the doc build because _config.yml sets execute_notebooks: force. Notebooks re-execute against today's environment, not the environment at release time, causing failures like:

examples_unreviewed/detailed_takeoff_landing.ipynb: WARNING: Executing notebook failed: CellExecutionError
WARNING: No key 'altitude_polynomial_order' found in glue data for this document.

Since the build uses -W --keep-going, these turn into a non-zero exit and the whole publish fails.

Root cause

Re-executing notebooks for a historical tag is inherently fragile: dependencies shift, tolerances drift, and unreviewed examples may have never been stable. The committed cell outputs in the tag were correct when it was cut — those are what we want to publish.

Fix

In the Build docs step for tag builds, patch _config.yml in-place before building to set execute_notebooks: "off". Jupyter Book then renders committed cell outputs instead of re-executing. The ./src/ checkout is throwaway so mutating _config.yml is safe.

🤖 Generated with Claude Code

Re-executing notebooks for historical tags is fragile: dependencies
shift, test tolerances drift, and examples that were unreviewed at
release time (examples_unreviewed/) may fail against newer environments.
The committed cell outputs were correct when the tag was cut.

Patch _config.yml in-place before building to set execute_notebooks=off
so jupyter-book uses committed outputs. The src/ checkout is throwaway
so mutating _config.yml is safe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hschilling
hschilling marked this pull request as draft September 28, 2026 17:32

This branch has not been deployed

No deployments
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