FrankYang0529 opened a new pull request, #76339:
URL: https://github.com/apache/airflow/pull/76339

   The Breeze docs tell contributors to reproduce a CI failure with `breeze 
ci-image load --from-pr` or `--from-run`. On main these options usually fail 
before they load anything. This PR makes them work, or stop with an error that 
says why.
   
   ### Why
   
   - `--from-pr` looks for a run of `ci.yml`. The CI workflows are now 
`ci-amd.yml` and `ci-arm.yml`, so it prints `Found run id None` and then gets a 
404 for the artifacts of run `None`.
   - `prod-image load --from-run` looks for `prod-image-save-linux_amd64-3.11`. 
An artifact name such as `prod-image-save-v3-linux_amd64-3.11-74488_merge` has 
`-v3-`, so the command prints `No artifact found`.
   - `ci-image load --from-run` reads only the first 30 artifacts of a run. Run 
41390598195 has 59 artifacts, and the artifact of its CI image is not in the 
first 30, so this command prints `No artifact found` too.
   - A downloaded image goes to `/tmp/`, but the command looks in 
`--image-file-dir`. That option defaults to the temp directory of Python, which 
is under `/var/folders` on macOS. So the command would report a missing image 
after a download of up to 2.5 GB.
   - Runs on RunsOn runners, such as canary runs and runs for PRs from a branch 
of `apache/airflow`, save only the digest of the image as an artifact. No error 
explains this.
   
   ### How
   
   - Each command passes the stash key of its image to the download functions, 
so finding the artifact no longer depends on the image file name.
   - The download reads every page of artifacts. It then moves the `.tar` file 
from the zip to the path that the command checks next.
   - `--from-pr` uses the latest `ci-amd.yml` run of the head commit of the PR.
   - The commands now exit with an error that explains each of these cases:
     - the run has no artifact for the requested image (the error lists the 
image artifacts that the run does have)
     - the head commit of the PR has no run
     - the artifact holds only a digest
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [X] Yes - Claude Code
   
   <!--
   Generated-by: [Tool Name] 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]

Reply via email to