This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch share-ci-image-docs-registry
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/share-ci-image-docs-registry
by this push:
new 1fa60f887c8 Retry the docs image build without a cache when the cached
one fails
1fa60f887c8 is described below
commit 1fa60f887c8d1175bac7c593f1617c0c15ce4b77
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Jul 28 14:15:52 2026 +0200
Retry the docs image build without a cache when the cached one fails
The build the docs job used to run inline fell back to a plain buildx build
whenever an old ref's pyproject.toml had drifted far enough from main that
main's registry cache could not satisfy it. Moving the build into its own
job dropped that safety net, which would turn a slow-but-correct build of
an old ref into a hard failure.
---
.github/workflows/publish-docs-to-s3.yml | 40 +++++++++++++++++++++++++++++---
1 file changed, 37 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/publish-docs-to-s3.yml
b/.github/workflows/publish-docs-to-s3.yml
index d15a0969080..53383f314df 100644
--- a/.github/workflows/publish-docs-to-s3.yml
+++ b/.github/workflows/publish-docs-to-s3.yml
@@ -255,8 +255,38 @@ jobs:
docker-cache: "registry"
disable-airflow-repo-cache: "false"
- build-docs:
+ # Building against main's registry cache can fail outright when the ref's
pyproject.toml has
+ # diverged from main — the case the docs job's inline `breeze ci-image build
|| docker buildx
+ # build` fallback used to cover. Retry once with the cache off, which is
slow but always
+ # correct. Skipped whenever the cached build worked, so a fresh cache costs
nothing.
+ build-ci-image-no-cache:
+ name: "Build CI image (no cache)"
needs: [build-info, build-ci-image]
+ if: always() && needs.build-ci-image.result == 'failure'
+ uses: ./.github/workflows/ci-image-build.yml
+ permissions:
+ contents: read
+ packages: write
+ with:
+ runners: '["ubuntu-22.04"]'
+ platform: "linux/amd64"
+ checkout-ref: ${{ inputs.ref }}
+ push-image: "false"
+ upload-image-artifact: "true"
+ upload-mount-cache-artifact: "true"
+ python-versions: ${{ format('["{0}"]',
needs.build-info.outputs.default-python-version) }}
+ branch: "main"
+ constraints-branch: "constraints-main"
+ use-uv: "true"
+ upgrade-to-newer-dependencies: "false"
+ docker-cache: "disabled"
+ disable-airflow-repo-cache: "false"
+
+ build-docs:
+ needs: [build-info, build-ci-image, build-ci-image-no-cache]
+ if: >
+ !cancelled() &&
+ (needs.build-ci-image.result == 'success' ||
needs.build-ci-image-no-cache.result == 'success')
timeout-minutes: 150
name: "Build documentation"
runs-on: ubuntu-latest
@@ -628,8 +658,12 @@ jobs:
update-registry:
# Runs alongside the docs build rather than after it: the registry reads
nothing the docs
# publish produces, so waiting only added its whole duration to the
release manager's wait.
- needs: [build-info, build-ci-image]
- if: needs.build-info.outputs.registry-providers != '' ||
needs.build-info.outputs.registry-full-build == 'true'
+ needs: [build-info, build-ci-image, build-ci-image-no-cache]
+ if: >
+ !cancelled() &&
+ (needs.build-ci-image.result == 'success' ||
needs.build-ci-image-no-cache.result == 'success') &&
+ (needs.build-info.outputs.registry-providers != '' ||
+ needs.build-info.outputs.registry-full-build == 'true')
name: "Update Provider Registry"
permissions:
contents: read