This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c12aea3de82 Allow to build apache-airflow documentation from branch
rather than tag (#53583)
c12aea3de82 is described below
commit c12aea3de8217fd6ed8c21694137e162259cf682
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Jul 21 15:11:15 2025 +0200
Allow to build apache-airflow documentation from branch rather than tag
(#53583)
We sometimes want to build airflow docs from tip of the branch - and in
this case we should be able to override the version we are building
rather than deriving it from the TAG.
---
.github/workflows/publish-docs-to-s3.yml | 29 ++++++++-
.../images/output_workflow-run_publish-docs.svg | 76 +++++++++++++++++-----
.../images/output_workflow-run_publish-docs.txt | 2 +-
.../airflow_breeze/commands/workflow_commands.py | 47 +++++++++++++
.../commands/workflow_commands_config.py | 14 +++-
5 files changed, 147 insertions(+), 21 deletions(-)
diff --git a/.github/workflows/publish-docs-to-s3.yml
b/.github/workflows/publish-docs-to-s3.yml
index 6c1eb1dd48a..cc12adc8433 100644
--- a/.github/workflows/publish-docs-to-s3.yml
+++ b/.github/workflows/publish-docs-to-s3.yml
@@ -52,7 +52,14 @@ on: # yamllint disable-line rule:truthy
required: false
default: false
type: boolean
-
+ airflow-base-version:
+ required: false
+ description: "Override the Airflow Base Version to use for the docs
build"
+ type: string
+ airflow-version:
+ required: false
+ description: "Override the Airflow Version to use for the docs build"
+ type: string
permissions:
contents: read
jobs:
@@ -69,6 +76,8 @@ jobs:
DESTINATION: ${{ inputs.destination }}
SKIP_WRITE_TO_STABLE_FOLDER: ${{ inputs.skip-write-to-stable-folder }}
BUILD_SBOMS: ${{ inputs.build-sboms }}
+ AIRFLOW_BASE_VERSION: ${{ inputs.airflow-base-version || '' }}
+ AIRFLOW_VERSION: ${{ inputs.airflow-version || '' }}
outputs:
include-docs: ${{ inputs.include-docs == 'all' && '' ||
inputs.include-docs }}
destination-location: ${{ steps.parameters.outputs.destination-location
}}
@@ -102,6 +111,8 @@ jobs:
echo "Destination: '${DESTINATION}'"
echo "Skip write to stable folder: '${SKIP_WRITE_TO_STABLE_FOLDER}'"
echo "Build SBOMs: '${BUILD_SBOMS}'"
+ echo "Airflow Base Version: '${AIRFLOW_BASE_VERSION}'"
+ echo "Airflow Version: '${AIRFLOW_VERSION}'"
if [[ "${DESTINATION}" == "auto" ]]; then
if [[ "${REF}" =~ ^.*[0-9]*\.[0-9]*\.[0-9]*$ ]]; then
echo "${REF} looks like final release, using live destination"
@@ -118,8 +129,20 @@ jobs:
echo
"destination-location=s3://staging-docs-airflow-apache-org/docs/" >>
${GITHUB_OUTPUT}
fi
if [[ " ${INCLUDE_DOCS} " =~ " apache-airflow " ]]; then
- AIRFLOW_BASE_VERSION=$(echo "${REF}" | grep -oE
'[0-9]+\.[0-9]+\.[0-9]+')
- AIRFLOW_VERSION="${REF}"
+ if [[ ${AIRFLOW_BASE_VERSION=} == "" && ${AIRFLOW_VERSION=} == ""
]]; then
+ echo "No Airflow Versions provided, using ${REF} to determine
it."
+ AIRFLOW_VERSION="${REF}"
+ set +e
+ AIRFLOW_BASE_VERSION=$(echo "${REF}" | grep -oE
'[0-9]+\.[0-9]+\.[0-9]+')
+ set -e
+ if [[ ${AIRFLOW_BASE_VERSION=} == "" ]]; then
+ echo
+ echo "No Airflow Base Version found in ${REF}"
+ echo "You need to force airflow version and airflow base
version in the workflow."
+ echo
+ exit 1
+ fi
+ fi
echo "airflow-base-version=${AIRFLOW_BASE_VERSION}" >>
${GITHUB_OUTPUT}
echo "airflow-version=${AIRFLOW_VERSION}" >> ${GITHUB_OUTPUT}
else
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 ccb1773b935..23f375ca723 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 @@
-<svg class="rich-terminal" viewBox="0 0 1482 782.0"
xmlns="http://www.w3.org/2000/svg">
+<svg class="rich-terminal" viewBox="0 0 1482 1050.4"
xmlns="http://www.w3.org/2000/svg">
<!-- Generated with Rich https://www.textualize.io -->
<style>
@@ -45,7 +45,7 @@
<defs>
<clipPath id="breeze-workflow-run-publish-docs-clip-terminal">
- <rect x="0" y="0" width="1463.0" height="731.0" />
+ <rect x="0" y="0" width="1463.0" height="999.4" />
</clipPath>
<clipPath id="breeze-workflow-run-publish-docs-line-0">
<rect x="0" y="1.5" width="1464" height="24.65"/>
@@ -134,9 +134,42 @@
<clipPath id="breeze-workflow-run-publish-docs-line-28">
<rect x="0" y="684.7" width="1464" height="24.65"/>
</clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-29">
+ <rect x="0" y="709.1" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-30">
+ <rect x="0" y="733.5" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-31">
+ <rect x="0" y="757.9" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-32">
+ <rect x="0" y="782.3" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-33">
+ <rect x="0" y="806.7" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-34">
+ <rect x="0" y="831.1" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-35">
+ <rect x="0" y="855.5" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-36">
+ <rect x="0" y="879.9" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-37">
+ <rect x="0" y="904.3" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-38">
+ <rect x="0" y="928.7" width="1464" height="24.65"/>
+ </clipPath>
+<clipPath id="breeze-workflow-run-publish-docs-line-39">
+ <rect x="0" y="953.1" width="1464" height="24.65"/>
+ </clipPath>
</defs>
- <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="780" rx="8"/><text
class="breeze-workflow-run-publish-docs-title" fill="#c5c8c6"
text-anchor="middle" x="740"
y="27">Command: workflow-run publish-docs</text>
+ <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="1048.4" rx="8"/><text
class="breeze-workflow-run-publish-docs-title" fill="#c5c8c6"
text-anchor="middle" x="740"
y="27">Command: workflow-run publish-docs</text>
<g transform="translate(26,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
@@ -163,19 +196,30 @@
</text><text class="breeze-workflow-run-publish-docs-r1" x="1464" y="361.6"
textLength="12.2" clip-path="url(#breeze-workflow-run-publish-docs-line-14)">
</text><text class="breeze-workflow-run-publish-docs-r1" x="12.2" y="386"
textLength="427"
clip-path="url(#breeze-workflow-run-publish-docs-line-15)">Trigger publish docs to S3 workflow</text><text
class="breeze-workflow-run-publish-docs-r1" x="1464" y="386" textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-15)">
</text><text class="breeze-workflow-run-publish-docs-r1" x="1464" y="410.4"
textLength="12.2" clip-path="url(#breeze-workflow-run-publish-docs-line-16)">
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="434.8"
textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-17)">╭─</text><text
class="breeze-workflow-run-publish-docs-r5" x="24.4" y="434.8"
textLength="378.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-17)"> Trigger publish docs workflow </text><text
class="breeze-workflow-run-publish-docs-r5" x="402.6" y="434.8"
textLength="1037" clip-path="url(#breeze-workflow-run [...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="459.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-18)">│</text><text
class="breeze-workflow-run-publish-docs-r6" x="24.4" y="459.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-18)">*</text><text
class="breeze-workflow-run-publish-docs-r4" x="61" y="459.2" textLength="61"
clip-path="url(#breeze-workflow-run-publish-docs-line-18)">--ref</text><text
class="breeze-workfl [...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="483.6"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-19)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="61" y="483.6" textLength="256.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-19)">--skip-tag-validation</text><text
class="breeze-workflow-run-publish-docs-r1" x="463.6" y="483.6"
textLength="976"
clip-path="url(#breeze-workflow-run-publish-docs-line-19)">Skip valid [...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="508"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-20)">│</text><text
class="breeze-workflow-run-publish-docs-r1" x="463.6" y="508" textLength="976"
clip-path="url(#breeze-workflow-run-publish-docs-line-20)">caution.                              
[...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="532.4"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-21)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="61" y="532.4" textLength="170.8"
clip-path="url(#breeze-workflow-run-publish-docs-line-21)">--exclude-docs</text><text
class="breeze-workflow-run-publish-docs-r1" x="463.6" y="532.4"
textLength="976"
clip-path="url(#breeze-workflow-run-publish-docs-line-21)">Comma separated&#
[...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="556.8"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-22)">│</text><text
class="breeze-workflow-run-publish-docs-r1" x="463.6" y="556.8"
textLength="976"
clip-path="url(#breeze-workflow-run-publish-docs-line-22)">(example: apache.druid,google)                         
[...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="581.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-23)">│</text><text
class="breeze-workflow-run-publish-docs-r7" x="463.6" y="581.2"
textLength="976"
clip-path="url(#breeze-workflow-run-publish-docs-line-23)">(TEXT)                              &#
[...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="605.6"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-24)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="61" y="605.6" textLength="122"
clip-path="url(#breeze-workflow-run-publish-docs-line-24)">--site-env</text><text
class="breeze-workflow-run-publish-docs-r1" x="463.6" y="605.6"
textLength="671"
clip-path="url(#breeze-workflow-run-publish-docs-line-24)">S3 bucket to 
[...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="630"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-25)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="61" y="630" textLength="353.8"
clip-path="url(#breeze-workflow-run-publish-docs-line-25)">--skip-write-to-stable-folder</text><text
class="breeze-workflow-run-publish-docs-r1" x="463.6" y="630" textLength="366"
clip-path="url(#breeze-workflow-run-publish-docs-line-25)">Skip wri [...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="654.4"
textLength="1464"
clip-path="url(#breeze-workflow-run-publish-docs-line-26)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-workflow-run-publish-docs-r1" x="1464" y="654.4"
textLength="12.2" clip-path="url(#breeze-workflow-run-publish-docs-line-26)">
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="678.8"
textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-27)">╭─</text><text
class="breeze-workflow-run-publish-docs-r5" x="24.4" y="678.8"
textLength="195.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-27)"> Common options </text><text
class="breeze-workflow-run-publish-docs-r5" x="219.6" y="678.8"
textLength="1220" clip-path="url(#breeze-workflow-run-publish-docs-line-27)">─
[...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="703.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-28)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="24.4" y="703.2"
textLength="73.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-28)">--help</text><text
class="breeze-workflow-run-publish-docs-r9" x="122" y="703.2" textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-28)">-h</text><text
class="breeze-w [...]
-</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="727.6"
textLength="1464"
clip-path="url(#breeze-workflow-run-publish-docs-line-29)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-workflow-run-publish-docs-r1" x="1464" y="727.6"
textLength="12.2" clip-path="url(#breeze-workflow-run-publish-docs-line-29)">
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="434.8"
textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-17)">╭─</text><text
class="breeze-workflow-run-publish-docs-r5" x="24.4" y="434.8"
textLength="439.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-17)"> Select branch or tag to build docs </text><text
class="breeze-workflow-run-publish-docs-r5" x="463.6" y="434.8"
textLength="976" clip-path="url(# [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="459.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-18)">│</text><text
class="breeze-workflow-run-publish-docs-r6" x="24.4" y="459.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-18)">*</text><text
class="breeze-workflow-run-publish-docs-r4" x="61" y="459.2" textLength="61"
clip-path="url(#breeze-workflow-run-publish-docs-line-18)">--ref</text><text
class="breeze-workfl [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="483.6"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-19)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="61" y="483.6" textLength="256.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-19)">--skip-tag-validation</text><text
class="breeze-workflow-run-publish-docs-r1" x="366" y="483.6"
textLength="1000.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-19)">Skip vali [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="508"
textLength="1464"
clip-path="url(#breeze-workflow-run-publish-docs-line-20)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-workflow-run-publish-docs-r1" x="1464" y="508" textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-20)">
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="532.4"
textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-21)">╭─</text><text
class="breeze-workflow-run-publish-docs-r5" x="24.4" y="532.4"
textLength="451.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-21)"> Optional airflow versions to build. </text><text
class="breeze-workflow-run-publish-docs-r5" x="475.8" y="532.4"
textLength="963.8" clip-path="url(#breeze- [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="556.8"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-22)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="24.4" y="556.8"
textLength="207.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-22)">--airflow-version</text><text
class="breeze-workflow-run-publish-docs-r1" x="341.6" y="556.8"
textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-22)">Override Ai
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="581.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-23)">│</text><text
class="breeze-workflow-run-publish-docs-r1" x="341.6" y="581.2"
textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-23)">from the ref. If only base version is provided, it will be set to the same as the base  
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="605.6"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-24)">│</text><text
class="breeze-workflow-run-publish-docs-r1" x="341.6" y="605.6"
textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-24)">version.                              
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="630"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-25)">│</text><text
class="breeze-workflow-run-publish-docs-r7" x="341.6" y="630" textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-25)">(TEXT)                               
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="654.4"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-26)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="24.4" y="654.4"
textLength="268.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-26)">--airflow-base-version</text><text
class="breeze-workflow-run-publish-docs-r1" x="341.6" y="654.4"
textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-26)">Override [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="678.8"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-27)">│</text><text
class="breeze-workflow-run-publish-docs-r1" x="341.6" y="678.8"
textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-27)">extracted from the ref. If airflow-version is provided, the base version of the version   </text><text
clas [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="703.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-28)">│</text><text
class="breeze-workflow-run-publish-docs-r1" x="341.6" y="703.2"
textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-28)">provided (i.e. stripped pre-/post-/dev- suffixes).                   
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="727.6"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-29)">│</text><text
class="breeze-workflow-run-publish-docs-r7" x="341.6" y="727.6"
textLength="1098"
clip-path="url(#breeze-workflow-run-publish-docs-line-29)">(TEXT)                              &
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="752"
textLength="1464"
clip-path="url(#breeze-workflow-run-publish-docs-line-30)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-workflow-run-publish-docs-r1" x="1464" y="752" textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-30)">
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="776.4"
textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-31)">╭─</text><text
class="breeze-workflow-run-publish-docs-r5" x="24.4" y="776.4" textLength="488"
clip-path="url(#breeze-workflow-run-publish-docs-line-31)"> Select docs to exclude and destination </text><text
class="breeze-workflow-run-publish-docs-r5" x="512.4" y="776.4"
textLength="927.2" clip-path="url(#b [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="800.8"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-32)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="24.4" y="800.8"
textLength="170.8"
clip-path="url(#breeze-workflow-run-publish-docs-line-32)">--exclude-docs</text><text
class="breeze-workflow-run-publish-docs-r1" x="427" y="800.8"
textLength="1012.6"
clip-path="url(#breeze-workflow-run-publish-docs-line-32)">Comma separate
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="825.2"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-33)">│</text><text
class="breeze-workflow-run-publish-docs-r1" x="427" y="825.2"
textLength="1012.6"
clip-path="url(#breeze-workflow-run-publish-docs-line-33)">(example: apache.druid,google)                         &#
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="849.6"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-34)">│</text><text
class="breeze-workflow-run-publish-docs-r7" x="427" y="849.6"
textLength="1012.6"
clip-path="url(#breeze-workflow-run-publish-docs-line-34)">(TEXT)                              &
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="874"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-35)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="24.4" y="874" textLength="122"
clip-path="url(#breeze-workflow-run-publish-docs-line-35)">--site-env</text><text
class="breeze-workflow-run-publish-docs-r1" x="427" y="874" textLength="671"
clip-path="url(#breeze-workflow-run-publish-docs-line-35)">S3 bucket to which&
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="898.4"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-36)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="24.4" y="898.4"
textLength="353.8"
clip-path="url(#breeze-workflow-run-publish-docs-line-36)">--skip-write-to-stable-folder</text><text
class="breeze-workflow-run-publish-docs-r1" x="427" y="898.4" textLength="366"
clip-path="url(#breeze-workflow-run-publish-docs-line-36)">Skip [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="922.8"
textLength="1464"
clip-path="url(#breeze-workflow-run-publish-docs-line-37)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-workflow-run-publish-docs-r1" x="1464" y="922.8"
textLength="12.2" clip-path="url(#breeze-workflow-run-publish-docs-line-37)">
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="947.2"
textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-38)">╭─</text><text
class="breeze-workflow-run-publish-docs-r5" x="24.4" y="947.2"
textLength="195.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-38)"> Common options </text><text
class="breeze-workflow-run-publish-docs-r5" x="219.6" y="947.2"
textLength="1220" clip-path="url(#breeze-workflow-run-publish-docs-line-38)">─
[...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="971.6"
textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-39)">│</text><text
class="breeze-workflow-run-publish-docs-r4" x="24.4" y="971.6"
textLength="73.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-39)">--help</text><text
class="breeze-workflow-run-publish-docs-r9" x="122" y="971.6" textLength="24.4"
clip-path="url(#breeze-workflow-run-publish-docs-line-39)">-h</text><text
class="breeze-w [...]
+</text><text class="breeze-workflow-run-publish-docs-r5" x="0" y="996"
textLength="1464"
clip-path="url(#breeze-workflow-run-publish-docs-line-40)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-workflow-run-publish-docs-r1" x="1464" y="996" textLength="12.2"
clip-path="url(#breeze-workflow-run-publish-docs-line-40)">
</text>
</g>
</g>
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 10a72e68d62..c50393f1fb8 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 @@
-d6a1511258a72057d4267040f78d2262
+9d78a242ea07f4467d68d6eb769c6e57
diff --git a/dev/breeze/src/airflow_breeze/commands/workflow_commands.py
b/dev/breeze/src/airflow_breeze/commands/workflow_commands.py
index c2a2f22029a..502e622b00c 100644
--- a/dev/breeze/src/airflow_breeze/commands/workflow_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/workflow_commands.py
@@ -73,6 +73,22 @@ def workflow_run():
help="Skip writing to stable folder.",
is_flag=True,
)
[email protected](
+ "--airflow-version",
+ help="Override 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.",
+ default=None,
+ type=str,
+)
[email protected](
+ "--airflow-base-version",
+ help="Override 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).",
+ default=None,
+ type=str,
+)
@argument_doc_packages
def workflow_run_publish(
ref: str,
@@ -81,6 +97,8 @@ def workflow_run_publish(
skip_tag_validation: bool,
doc_packages: tuple[str, ...],
skip_write_to_stable_folder: bool = False,
+ airflow_version: str | None = None,
+ airflow_base_version: str | None = None,
):
if os.environ.get("GITHUB_TOKEN", ""):
get_console().print("\n[warning]Your authentication will use
GITHUB_TOKEN environment variable.")
@@ -115,6 +133,30 @@ def workflow_run_publish(
get_console().print(
f"[blue]Triggering workflow {WORKFLOW_NAME_MAPS['publish-docs']}: at
{APACHE_AIRFLOW_REPO}[/blue]",
)
+ from packaging.version import InvalidVersion, Version
+
+ if airflow_version:
+ try:
+ Version(airflow_version)
+ except InvalidVersion as e:
+ f"[red]Invalid version passed as --airflow-version:
{airflow_version}[/red]: {e}"
+ sys.exit(1)
+ get_console().print(
+ f"[blue]Using provided Airflow version: {airflow_version}[/blue]",
+ )
+ if airflow_base_version:
+ try:
+ Version(airflow_base_version)
+ except InvalidVersion as e:
+ f"[red]Invalid base version passed as --airflow-base-version:
{airflow_version}[/red]: {e}"
+ sys.exit(1)
+ get_console().print(
+ f"[blue]Using provided Airflow base version:
{airflow_base_version}[/blue]",
+ )
+ if not airflow_version and airflow_base_version:
+ airflow_version = airflow_base_version
+ if airflow_version and not airflow_base_version:
+ airflow_base_version = Version(airflow_version).base_version
workflow_fields = {
"ref": ref,
@@ -125,6 +167,11 @@ def workflow_run_publish(
"build-sboms": "true" if "apache-airflow" in doc_packages else "false",
}
+ if airflow_version:
+ workflow_fields["airflow-version"] = airflow_version
+ if airflow_base_version:
+ workflow_fields["airflow-base-version"] = airflow_base_version
+
trigger_workflow_and_monitor(
workflow_name=WORKFLOW_NAME_MAPS["publish-docs"],
repo=APACHE_AIRFLOW_REPO,
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 3ffb4e92f11..3ebfca1d7c2 100644
--- a/dev/breeze/src/airflow_breeze/commands/workflow_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/workflow_commands_config.py
@@ -24,10 +24,22 @@ WORKFLOW_RUN_COMMANDS: dict[str, str | list[str]] = {
WORKFLOW_RUN_PARAMETERS: dict[str, list[dict[str, str | list[str]]]] = {
"breeze workflow-run publish-docs": [
{
- "name": "Trigger publish docs workflow",
+ "name": "Select branch or tag to build docs",
"options": [
"--ref",
"--skip-tag-validation",
+ ],
+ },
+ {
+ "name": "Optional airflow versions to build.",
+ "options": [
+ "--airflow-version",
+ "--airflow-base-version",
+ ],
+ },
+ {
+ "name": "Select docs to exclude and destination",
+ "options": [
"--exclude-docs",
"--site-env",
"--skip-write-to-stable-folder",