diff --git a/dev/breeze/doc/images/output-commands.svg b/dev/breeze/doc/images/output-commands.svg index 8aa291bc175d0..8a83d5a691da2 100644 --- a/dev/breeze/doc/images/output-commands.svg +++ b/dev/breeze/doc/images/output-commands.svg @@ -331,62 +331,62 @@ Usage:breeze[OPTIONSCOMMAND [ARGS]... ╭─ Execution mode ─────────────────────────────────────────────────────────────────────────────────────────────────────╮ ---python-pPython major/minor version used in Airflow image for    +--python-pPython major/minor version used in Airflow image for    images.                                                 (>3.9< | 3.10 | 3.11 | 3.12)                            [default: 3.9]                                          ---integrationCore Integrations to enable when running (can be more   +--integrationCore Integrations to enable when running (can be more   than one).                                              (all | all-testable | cassandra | celery | drill |      kafka | kerberos | keycloak | mongo | mssql |           openlineage | otel | pinot | qdrant | redis | statsd |  tinkerpop | trino | ydb)                                ---standalone-dag-processor/--no-standalone-dag-processoRun standalone dag processor for start-airflow          -r(required for Airflow 3).                               +--standalone-dag-processor/--no-standalone-dag-process…Run standalone dag processor for start-airflow          +(required for Airflow 3).                               [default: standalone-dag-processor]                     ---auth-managerSpecify the auth manager to set        +--auth-managerSpecify the auth manager to set        (>SimpleAuthManager< | FabAuthManager) [default: SimpleAuthManager]           ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Docker Compose selection and cleanup ───────────────────────────────────────────────────────────────────────────────╮ ---project-nameName of the docker-compose project to bring down. The `docker-compose` is for legacy breeze        -project name and you can use `breeze down --project-name docker-compose` to stop all containers    +--project-nameName of the docker-compose project to bring down. The `docker-compose` is for legacy breeze        +project name and you can use `breeze down --project-name docker-compose` to stop all containers    belonging to it.                                                                                   (breeze | prek | docker-compose)                                                                   [default: breeze]                                                                                  ---docker-hostOptional - docker host to use when running docker commands. When set, the `--builder` option is    +--docker-hostOptional - docker host to use when running docker commands. When set, the `--builder` option is    ignored when building images.                                                                      (TEXT)                                                                                             ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Database ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ ---backend-bDatabase backend to use. Default is 'sqlite'. If 'none' is chosen, Breeze will +--backend-bDatabase backend to use. Default is 'sqlite'. If 'none' is chosen, Breeze will start with an invalid database configuration — no database will be available,  and any attempt to run Airflow will fail. Use 'none' only for specific non-DB  test cases.                                                                    (>sqlite< | mysql | postgres | none)                                           [default: sqlite]                                                              ---postgres-version-PVersion of Postgres used.(>13< | 14 | 15 | 16 | 17)[default: 13] ---mysql-version-MVersion of MySQL used.(>8.0< | 8.4)[default: 8.0] ---db-reset-d/--no-db-resetReset DB when entering the container.[default: no-db-reset] +--postgres-version-PVersion of Postgres used.(>13< | 14 | 15 | 16 | 17)[default: 13] +--mysql-version-MVersion of MySQL used.(>8.0< | 8.4)[default: 8.0] +--db-reset-d/--no-db-resetReset DB when entering the container.[default: no-db-reset] ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Build CI image (before entering shell) ─────────────────────────────────────────────────────────────────────────────╮ ---github-repository-gGitHub repository used to pull, push run images.(TEXT)[default: apache/airflow] ---builderBuildx builder used to perform `docker buildx build` commands.(TEXT) +--github-repository-gGitHub repository used to pull, push run images.(TEXT)[default: apache/airflow] +--builderBuildx builder used to perform `docker buildx build` commands.(TEXT) [default: autodetect]                                          ---use-uv/--no-use-uvUse uv instead of pip as packaging tool to build the image.[default: use-uv] ---uv-http-timeoutTimeout for requests that UV makes (only used in case of UV builds).(INTEGER RANGE) +--use-uv/--no-use-uvUse uv instead of pip as packaging tool to build the image.[default: use-uv] +--uv-http-timeoutTimeout for requests that UV makes (only used in case of UV builds).(INTEGER RANGE) [default: 300; x>=1]                                                 ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Other options ──────────────────────────────────────────────────────────────────────────────────────────────────────╮ ---forward-credentials-fForward local credentials to container when running. ---max-timeMaximum time that the command should take - if it takes longer, the command will fail. +--forward-credentials-fForward local credentials to container when running. +--max-timeMaximum time that the command should take - if it takes longer, the command will fail. (INTEGER RANGE)                                                                        ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Common options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮ ---answer-aForce answer to questions.(y | n | q | yes | no | quit) ---dry-run-DIf dry-run is set, commands are only printed, not executed. ---verbose-vPrint verbose information about performed steps. ---help-hShow this message and exit. +--answer-aForce answer to questions.(y | n | q | yes | no | quit) +--dry-run-DIf dry-run is set, commands are only printed, not executed. +--verbose-vPrint verbose information about performed steps. +--help-hShow this message and exit. ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Developer commands ─────────────────────────────────────────────────────────────────────────────────────────────────╮ start-airflow          Enter breeze environment and starts all Airflow components in the tmux session. Compile     diff --git a/dev/breeze/doc/images/output_workflow-run_publish-docs.svg b/dev/breeze/doc/images/output_workflow-run_publish-docs.svg index d15db05f27901..5c2fcf826611e 100644 --- a/dev/breeze/doc/images/output_workflow-run_publish-docs.svg +++ b/dev/breeze/doc/images/output_workflow-run_publish-docs.svg @@ -1,4 +1,4 @@ - + Trigger publish docs to S3 workflow ╭─ Select branch or tag to build docs ─────────────────────────────────────────────────────────────────────────────────╮ -*--refGit reference tag to checkout to build documentation.(TEXT)[required] ---skip-tag-validationSkip validation of the tag. Allows to use `main` or commit hash. Use with caution. ---apply-commitsApply commits before building the docs - for example to patch fixes to the docs (comma   +*--refGit reference tag to checkout to build documentation.(TEXT)[required] +--skip-tag-validationSkip validation of the tag. Allows to use `main` or commit hash. Use with caution. +--apply-commitsApply commits before building the docs - for example to patch fixes to the docs (comma   separated list of commits).                                                              (TEXT)                                                                                   -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭─ Optional airflow versions to build. ────────────────────────────────────────────────────────────────────────────────╮ ---airflow-versionOverride Airflow Version to use for the docs build. If not provided, it will be extracted  -from the ref. If only base version is provided, it will be set to the same as the base     -version.                                                                                   -(TEXT)                                                                                     ---airflow-base-versionOverride Airflow Base Version to use for the docs build. If not provided, it will be       -extracted from the ref. If airflow-version is provided, the base version of the version    -provided (i.e. stripped pre-/post-/dev- suffixes).                                         -(TEXT)                                                                                     -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭─ Select docs to exclude and destination ─────────────────────────────────────────────────────────────────────────────╮ ---exclude-docsComma separated short name list of docs packages to exclude from the publish.       -(example: apache.druid,google)                                                      -(TEXT)                                                                              ---site-envS3 bucket to which the documentation will be published.(auto | live | staging) ---skip-write-to-stable-folderSkip writing to stable folder. -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭─ Common options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮ ---help-hShow this message and exit. -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +--workflow-branchBranch to run the workflow on. Defaults to 'main'.(TEXT) +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Optional airflow versions to build. ────────────────────────────────────────────────────────────────────────────────╮ +--airflow-versionOverride Airflow Version to use for the docs build. If not provided, it will be extracted  +from the ref. If only base version is provided, it will be set to the same as the base     +version.                                                                                   +(TEXT)                                                                                     +--airflow-base-versionOverride Airflow Base Version to use for the docs build. If not provided, it will be       +extracted from the ref. If airflow-version is provided, the base version of the version    +provided (i.e. stripped pre-/post-/dev- suffixes).                                         +(TEXT)                                                                                     +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Select docs to exclude and destination ─────────────────────────────────────────────────────────────────────────────╮ +--exclude-docsComma separated short name list of docs packages to exclude from the publish.       +(example: apache.druid,google)                                                      +(TEXT)                                                                              +--site-envS3 bucket to which the documentation will be published.(auto | live | staging) +--skip-write-to-stable-folderSkip writing to stable folder. +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Common options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮ +--help-hShow this message and exit. +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/dev/breeze/doc/images/output_workflow-run_publish-docs.txt b/dev/breeze/doc/images/output_workflow-run_publish-docs.txt index 60622b27972aa..9d1d737f693a0 100644 --- a/dev/breeze/doc/images/output_workflow-run_publish-docs.txt +++ b/dev/breeze/doc/images/output_workflow-run_publish-docs.txt @@ -1 +1 @@ -4a33a1d9ebcb6ffa3f23ee25e9b8e205 +794758b6e359e41c0e8bc4b62e96790b diff --git a/dev/breeze/src/airflow_breeze/commands/workflow_commands.py b/dev/breeze/src/airflow_breeze/commands/workflow_commands.py index 45e86f2aa7235..359c5fe95d399 100644 --- a/dev/breeze/src/airflow_breeze/commands/workflow_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/workflow_commands.py @@ -96,6 +96,12 @@ def workflow_run(): default=None, type=str, ) +@click.option( + "--workflow-branch", + help="Branch to run the workflow on. Defaults to 'main'.", + default="main", + type=str, +) @argument_doc_packages def workflow_run_publish( ref: str, @@ -107,6 +113,7 @@ def workflow_run_publish( airflow_version: str | None = None, airflow_base_version: str | None = None, apply_commits: str | None = None, + workflow_branch: str = "main", ): if len(doc_packages) == 0: get_console().print( @@ -189,7 +196,7 @@ def workflow_run_publish( trigger_workflow_and_monitor( workflow_name=WORKFLOW_NAME_MAPS["publish-docs"], repo=APACHE_AIRFLOW_REPO, - branch="main", + branch=workflow_branch, **workflow_fields, ) diff --git a/dev/breeze/src/airflow_breeze/commands/workflow_commands_config.py b/dev/breeze/src/airflow_breeze/commands/workflow_commands_config.py index d1ea027628e02..2856e722ae465 100644 --- a/dev/breeze/src/airflow_breeze/commands/workflow_commands_config.py +++ b/dev/breeze/src/airflow_breeze/commands/workflow_commands_config.py @@ -29,6 +29,7 @@ "--ref", "--skip-tag-validation", "--apply-commits", + "--workflow-branch", ], }, {