Skip to content

Speed up Publish Docs to S3 with main CI image cache#65108

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:speed-up-publish-docs-cache
Apr 13, 2026
Merged

Speed up Publish Docs to S3 with main CI image cache#65108
potiuk merged 1 commit intoapache:mainfrom
potiuk:speed-up-publish-docs-cache

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Apr 12, 2026

The build-docs job in publish-docs-to-s3.yml was rebuilding the CI image from scratch on
every run because it never logged in to ghcr.io, so Buildx could not reach the registry
cache tag (<image>:cache-<platform>) that the main "Test" workflow pushes via
push-image-cache.yml. The manual docker buildx build fallback also had no --cache-from
and a hardcoded python3.9 tag that no longer matched the Python version used for the docs
build.

Summary

  • Add a docker login ghcr.io step in build-docs so breeze ci-image build can actually
    pull the registry buildx cache published by the last "main" Test workflow.
  • Set DOCKER_CACHE=registry and PYTHON_MAJOR_MINOR_VERSION explicitly on the job so the
    cache lookup is deterministic and matches default-python-version.
  • Grant packages: read to the build-docs job.
  • Fix the stale python3.9 tag in the buildx fallback so it derives from
    PYTHON_MAJOR_MINOR_VERSION.
  • Refresh the two comments that still claimed the job "will not use cache" and explain why
    the fallback path (no --cache-from) still exists for old refs whose pyproject.toml has
    drifted from main.

The fast path now hits the same registry cache the main Test workflow pushes; the fallback
is untouched and still handles the old-ref drift case.


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

Generated-by: Claude Code (Opus 4.6) following the guidelines

The `build-docs` job in `publish-docs-to-s3.yml` was rebuilding the CI
image from scratch because it never logged in to ghcr.io, so Buildx
could not reach the registry cache tag pushed by the main "Test"
workflow. The manual `docker buildx build` fallback also had no
`--cache-from`, and a hardcoded `python3.9` tag that no longer matched
the Python version used for the docs build.

Add a `docker login ghcr.io` step, set `DOCKER_CACHE=registry` and
`PYTHON_MAJOR_MINOR_VERSION` explicitly, and grant `packages: read` on
the job so `breeze ci-image build` consumes the same
`<image>:cache-<platform>` tag that `push-image-cache.yml` publishes
from main. Fix the stale python tag in the fallback and refresh the
comments that still claimed the job "will not use cache".
@boring-cyborg boring-cyborg bot added area:dev-tools backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch labels Apr 12, 2026
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Apr 12, 2026

cc: @gopidesupavan @kaxil @vatsrahul1001 @vincbeck @eladkal - if you wondered why building docs for publishing takes extra few minutes - this is why it was.

@potiuk potiuk merged commit f3843d9 into apache:main Apr 13, 2026
143 checks passed
@potiuk potiuk deleted the speed-up-publish-docs-cache branch April 13, 2026 14:00
github-actions bot pushed a commit that referenced this pull request Apr 13, 2026
…ache (#65108)

The `build-docs` job in `publish-docs-to-s3.yml` was rebuilding the CI
image from scratch because it never logged in to ghcr.io, so Buildx
could not reach the registry cache tag pushed by the main "Test"
workflow. The manual `docker buildx build` fallback also had no
`--cache-from`, and a hardcoded `python3.9` tag that no longer matched
the Python version used for the docs build.

Add a `docker login ghcr.io` step, set `DOCKER_CACHE=registry` and
`PYTHON_MAJOR_MINOR_VERSION` explicitly, and grant `packages: read` on
the job so `breeze ci-image build` consumes the same
`<image>:cache-<platform>` tag that `push-image-cache.yml` publishes
from main. Fix the stale python tag in the fallback and refresh the
comments that still claimed the job "will not use cache".
(cherry picked from commit f3843d9)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@github-actions
Copy link
Copy Markdown

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

potiuk added a commit that referenced this pull request Apr 13, 2026
…ache (#65108) (#65144)

The `build-docs` job in `publish-docs-to-s3.yml` was rebuilding the CI
image from scratch because it never logged in to ghcr.io, so Buildx
could not reach the registry cache tag pushed by the main "Test"
workflow. The manual `docker buildx build` fallback also had no
`--cache-from`, and a hardcoded `python3.9` tag that no longer matched
the Python version used for the docs build.

Add a `docker login ghcr.io` step, set `DOCKER_CACHE=registry` and
`PYTHON_MAJOR_MINOR_VERSION` explicitly, and grant `packages: read` on
the job so `breeze ci-image build` consumes the same
`<image>:cache-<platform>` tag that `push-image-cache.yml` publishes
from main. Fix the stale python tag in the fallback and refresh the
comments that still claimed the job "will not use cache".
(cherry picked from commit f3843d9)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@eladkal
Copy link
Copy Markdown
Contributor

eladkal commented Apr 13, 2026

Nice!

dandanseo123 pushed a commit to dandanseo123/airflow that referenced this pull request Apr 13, 2026
…#65108)

The `build-docs` job in `publish-docs-to-s3.yml` was rebuilding the CI
image from scratch because it never logged in to ghcr.io, so Buildx
could not reach the registry cache tag pushed by the main "Test"
workflow. The manual `docker buildx build` fallback also had no
`--cache-from`, and a hardcoded `python3.9` tag that no longer matched
the Python version used for the docs build.

Add a `docker login ghcr.io` step, set `DOCKER_CACHE=registry` and
`PYTHON_MAJOR_MINOR_VERSION` explicitly, and grant `packages: read` on
the job so `breeze ci-image build` consumes the same
`<image>:cache-<platform>` tag that `push-image-cache.yml` publishes
from main. Fix the stale python tag in the fallback and refresh the
comments that still claimed the job "will not use cache".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants