Skip to content

Add --local-theme flag to breeze build-docs for local theme development - #70139

Open
srchilukoori wants to merge 1 commit into
apache:mainfrom
srchilukoori:feature/local-theme-mount
Open

Add --local-theme flag to breeze build-docs for local theme development#70139
srchilukoori wants to merge 1 commit into
apache:mainfrom
srchilukoori:feature/local-theme-mount

Conversation

@srchilukoori

Copy link
Copy Markdown
Contributor

Add a --local-theme flag to breeze build-docs that bind-mounts a local
sphinx-airflow-theme directory into the container. This lets developers
iterate on theme changes without publishing a wheel or bumping versions.

Usage:

breeze build-docs --local-theme ~/airflow-site/sphinx_airflow_theme

Follows the existing --mount-ui-dist compose overlay pattern: one new
compose file, one ShellParams field, one click option. Default behavior
(no flag) is unchanged; CI never passes --local-theme.

This replaces the approach in #65840 (adding sphinx-airflow-theme as a uv
workspace member), which was closed after the reviewer pivoted to a
bind-mount approach.

closes: #45576
related: #65840

Files changed

File Change
scripts/ci/docker-compose/mount-local-theme.yml Compose overlay, mounts $LOCAL_THEME_PATH over /opt/airflow/docs-theme/sphinx_airflow_theme/
dev/breeze/src/airflow_breeze/utils/path_utils.py Path constant
dev/breeze/src/airflow_breeze/commands/common_options.py --local-theme click option (Path, dir-only, resolve)
dev/breeze/src/airflow_breeze/params/shell_params.py Field, compose overlay append, env var
dev/breeze/src/airflow_breeze/commands/developer_commands.py Wire through build_docs and _build_python_docs
dev/breeze/src/airflow_breeze/commands/developer_commands_config.py Help grouping
dev/breeze/tests/test_shell_params.py 4 test cases (env var + compose overlay)
dev/breeze/doc/images/output_build-docs.* Auto-regenerated CLI help

Test plan

  • pytest dev/breeze/tests/test_shell_params.py (20 passed)
  • pytest dev/breeze/tests/test_docker_command_utils.py dev/breeze/tests/test_run_test_args.py (86 passed)
  • prek run --from-ref upstream/main --stage pre-commit (all passed)
  • Manual: breeze build-docs --local-theme <path> with a local airflow-site checkout

Was generative AI tooling used to co-author this PR?
  • Yes (Claude)

@potiuk

potiuk commented Jul 20, 2026

Copy link
Copy Markdown
Member

I think we also need a doc describing the process. It also should run doc build to automatically rebuild changes (The docs build already has this option) and we should make sure that the mounted sphinx_theme files are automatically rebuilt when they are changed in the mounted directory - this should be locally tested if ti works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to mount airflow-site/sphinx_airflow_theme when running CI locally

2 participants