Skip to content

Commit 37bda61

Browse files
committed
Add --one-pass-only parameter to breeze docs build command
The parameter was previously supported in the docs-build script but it was not exposed via breeze commands. It allows to iterate faster on docs building, by default docs building runs up to 3 passes in order to account for new cross-references between multiple providers, this flag makes it one pass, which makes it faster to summarize the errors when you try to nail down a problem with docs.
1 parent 874ea95 commit 37bda61

File tree

6 files changed

+67
-53
lines changed

6 files changed

+67
-53
lines changed

dev/breeze/src/airflow_breeze/commands/developer_commands.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ def start_airflow(
312312
"Implies --clean-build",
313313
is_flag=True,
314314
)
315+
@click.option(
316+
"--one-pass-only",
317+
help="Builds documentation in one pass only. This is useful for debugging sphinx errors.",
318+
is_flag=True,
319+
)
315320
@option_github_repository
316321
@option_verbose
317322
@option_dry_run
@@ -320,6 +325,7 @@ def build_docs(
320325
spellcheck_only: bool,
321326
for_production: bool,
322327
clean_build: bool,
328+
one_pass_only: bool,
323329
package_filter: tuple[str],
324330
github_repository: str,
325331
):

dev/breeze/src/airflow_breeze/commands/developer_commands_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
"--spellcheck-only",
147147
"--clean-build",
148148
"--for-production",
149+
"--one-pass-only",
149150
"--package-filter",
150151
"--github-repository",
151152
],

dev/breeze/src/airflow_breeze/params/doc_build_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class DocBuildParams:
2929
spellcheck_only: bool
3030
for_production: bool
3131
skip_environment_initialization: bool = False
32+
one_pass_only: bool = False
3233
github_actions = os.environ.get("GITHUB_ACTIONS", "false")
3334

3435
@property
@@ -40,6 +41,8 @@ def args_doc_builder(self) -> list[str]:
4041
doc_args.append("--spellcheck-only")
4142
if self.for_production:
4243
doc_args.append("--for-production")
44+
if self.one_pass_only:
45+
doc_args.append("--one-pass-only")
4346
if AIRFLOW_BRANCH != "main":
4447
doc_args.append("--disable-provider-checks")
4548
if self.package_filter and len(self.package_filter) > 0:

images/breeze/output-commands-hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Please do not solve it but run `breeze setup regenerate-command-images`.
33
# This command should fix the conflict and regenerate help images that you have conflict with.
44
main:83de6a9bf2b1afecd1f9ce4cd0493733
5-
build-docs:61ddf42565c6e39b2a1b228b2a0e89de
5+
build-docs:093cf82ab80aee65c6ada9b16ac60612
66
ci:find-newer-dependencies:8fa2b57f5f0523c928743b235ee3ab5a
77
ci:fix-ownership:fee2c9ec9ef19686792002ae054fecdd
88
ci:free-space:47234aa0a60b0efd84972e6e797379f8

0 commit comments

Comments
 (0)