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

   ## Summary
   
   PRs that touch many files (e.g. Dependabot bumps with 37 packages)
   currently fail the very first CI step — `Cleanup repo` — with:
   
       ##[error]An error occurred trying to start process '/usr/bin/bash'
       ... Argument list too long
   
   Failing example: 
https://github.com/apache/airflow/actions/runs/24976693221/job/73180368636 (PR 
#65911 on `v3-2-test`).
   
   Root cause: `build-info` jobs set `GITHUB_CONTEXT: ${{ toJson(github) }}`
   at the job level, leaking the huge JSON into the env of every step.
   `Cleanup repo` doesn't need it, but the breeze commands in the same
   job (`selective-check`, `get-workflow-info`) do — so removing it
   outright would break them.
   
   ## What changed
   
   - **5 workflows**: drop the job-level `GITHUB_CONTEXT`. Only 4 of them 
actually consumed it; `publish-docs-to-s3.yml` was dead code.
   - **4 workflows that need the context for breeze**: write it to a file once 
via a single-quoted heredoc and pass `GITHUB_CONTEXT_INPUT=path` to the breeze 
invocations. The blob never enters any step's env.
   - **Breeze**: add `--github-context-input` to `breeze ci selective-check` 
(env `GITHUB_CONTEXT_INPUT`) for parity with `breeze ci get-workflow-info`. 
Mutually exclusive with `--github-context`.
   
   The "Save github context to file" step carries `# zizmor: 
ignore[template-injection]`. It's a false positive in this shape — the 
substituted JSON sits inside a single-quoted heredoc, which disables every form 
of bash expansion, and `cat` writes the bytes verbatim to disk; nothing the 
github context contains can be executed as shell. Full reasoning is inlined as 
a comment in `ci-amd-arm.yml`.
   
   ## Test plan
   
   - [x] `GITHUB_CONTEXT_INPUT=/tmp/ctx.json breeze ci selective-check` works 
locally.
   - [x] Both `--github-context` and `--github-context-input` set together 
errors cleanly.
   - [x] `prek` pre-commit and manual stages pass on changed files (yamllint, 
zizmor, ruff, breeze docs).
   - [ ] CI on this PR exercises `ci-amd-arm.yml`; the other 3 workflows fire 
on push/dispatch — would benefit from a test run on a Dependabot-style PR after 
merge.
   
   After this lands on `main`, this needs cherry-picking to `v3-2-test` (and 
`v3-1-test` if those workflows exist there) — that's where the failing PR 
actually lives.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Opus 4.7 (Claude Code)
   
   Generated-by: Claude Opus 4.7 (Claude Code) 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