zozo123 opened a new pull request, #74052: URL: https://github.com/apache/airflow/pull/74052
Every CI image build restores the uv cache saved from `main` (`ci-cache-mount-save-v3-*`, about 490 MB) and `breeze ci-image import-mount-cache` loads it into the BuildKit cache mount that `Dockerfile.ci` uses for `uv sync`. Right after the import the command ran `docker system prune -f`. With BuildKit that also deletes unused build cache, which includes the cache mount it had just filled. Every build log shows `Deleted build cache objects:` right after the import, and `uv sync` then compiles the sdist-only packages again: | Build | `uv sync` in `install_airflow_when_building_images.sh` | |---|---| | amd64 PR build ([job 110560971400](https://github.com/apache/airflow/actions/runs/36919232675/job/110560971400)) | `Prepared 930 packages in 4m 35s`: gssapi built at 183 s, krb5 252 s, lxml 273 s, xmlsec 276 s; step 307 s | | amd64 canary ([run 36872758767](https://github.com/apache/airflow/actions/runs/36872758767)) | `Prepared 922 packages in 3m 57s` | | arm64 canary ([run 36832107316](https://github.com/apache/airflow/actions/runs/36832107316)) | `Prepared 920 packages in 2m 50s` | The restored cache does hold those wheels, for example `uv/sdists-v9/pypi/gssapi/1.12.0/<rev>/gssapi-1.12.0-cp310-cp310-linux_x86_64.whl`. Every test job waits for this build, so the recompile sits on the critical path of every PR. `docker image prune -f` still removes the dangling layers the import leaves behind, without touching the build cache. `breeze ci free-space`, the only other prune in these jobs, runs before the import. Checks run: - In a throwaway `docker:28-dind` (engine 28.5.2): fill a cache mount, then `docker rmi` and `docker system prune -f`. The next build sees an empty mount. With `docker image prune -f` instead, the content survives. - Imported the real `ci-cache-mount-save-v3-linux_amd64-3.10-main` artifact the same way, without the system prune. uv 0.12.18 then ran `uv pip install --no-binary lxml --no-binary xmlsec lxml==6.1.3 xmlsec==1.3.17 gssapi==1.12.0 krb5==0.10.0` and reported `Prepared 5 packages in 339ms`. - `dev/breeze/tests/test_ci_image_commands.py` passes (17 tests). The new test fails with the previous code. prek pre-commit and manual stages pass. PR runs build the image with this branch's Breeze, so the *Build CI images* job of this PR should show the effect: no `Built lxml` or `Built krb5` lines, and a shorter `uv sync` step. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
