This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-2-test by this push:
     new 2dbf75aef7c Fix CI 'Argument list too long' on Cleanup repo for big 
PRs (#65947) (#65961)
2dbf75aef7c is described below

commit 2dbf75aef7c18bbb6b584a3d09856d3b6acefae2
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Apr 27 17:21:27 2026 +0200

    Fix CI 'Argument list too long' on Cleanup repo for big PRs (#65947) 
(#65961)
    
    The Cleanup repo step at the start of every CI build-info job
    failed with "Argument list too long" on PRs that touch many
    files (e.g. Dependabot bumps with 37 packages), because
    GITHUB_CONTEXT: ${{ toJson(github) }} was set at the job level
    and the giant JSON bloated every step's environment past the
    OS ARG_MAX limit.
    
    Drop the job-level GITHUB_CONTEXT in 5 workflows. The 4 that
    actually need it for breeze write it to a file once via a
    single-quoted heredoc and pass GITHUB_CONTEXT_INPUT=path to the
    breeze invocations, keeping the blob entirely out of any step's
    env. breeze ci selective-check gains --github-context-input
    for parity with breeze ci get-workflow-info.
    
    (cherry picked from commit 32b0040cd23b477972375edd4150aa1d6661a79f)
---
 .github/workflows/ci-amd-arm.yml                   | 29 +++++++++++++++--
 .github/workflows/publish-docs-to-s3.yml           |  1 -
 .github/workflows/release_dockerhub_image.yml      | 11 ++++++-
 .../update-constraints-on-push-stable.yml          | 12 +++++--
 .github/workflows/update-constraints-on-push.yml   | 12 +++++--
 .../doc/images/output_ci_selective-check.svg       | 38 +++++++++++++---------
 .../doc/images/output_ci_selective-check.txt       |  2 +-
 .../src/airflow_breeze/commands/ci_commands.py     | 13 ++++++++
 .../airflow_breeze/commands/ci_commands_config.py  |  1 +
 9 files changed, 94 insertions(+), 25 deletions(-)

diff --git a/.github/workflows/ci-amd-arm.yml b/.github/workflows/ci-amd-arm.yml
index d96dc825209..3effc5a4e7a 100644
--- a/.github/workflows/ci-amd-arm.yml
+++ b/.github/workflows/ci-amd-arm.yml
@@ -51,8 +51,6 @@ jobs:
     name: "Build info"
     # At build-info stage we do not yet have outputs so we need to hard-code 
the runs-on to public runners
     runs-on: ["ubuntu-22.04"]
-    env:
-      GITHUB_CONTEXT: ${{ toJson(github) }}
     outputs:
       all-python-versions-list-as-string: >-
         ${{ steps.selective-checks.outputs.all-python-versions-list-as-string 
}}
@@ -156,23 +154,48 @@ jobs:
       - name: "Install Breeze"
         uses: ./.github/actions/breeze
         id: breeze
+      - name: "Save github context to file"
+        # The github context can be very large for PRs that touch many files 
(e.g. Dependabot
+        # bumps with dozens of packages). Passing it as an env var would 
exceed ARG_MAX and
+        # prevent subsequent steps from starting bash, so we write it to a 
file once here and
+        # let downstream breeze invocations read it via GITHUB_CONTEXT_INPUT.
+        #
+        # Zizmor flags this as template-injection because 
attacker-controllable fields in the
+        # github context (PR title, body, branch names) are pasted into a 
`run:` script. It is
+        # a false positive in this specific shape:
+        #   * the substituted JSON sits inside a SINGLE-QUOTED heredoc (`<< 
'__GITHUB_CONTEXT_END__'`),
+        #     which disables ALL bash expansion -- $(...), `...`, ${...}, and 
even `\` are literal,
+        #     so no shell metacharacter in the JSON can be evaluated;
+        #   * the only remaining escape is the delimiter 
`__GITHUB_CONTEXT_END__` appearing on a
+        #     line by itself in the JSON. `toJson` escapes newlines inside 
string values as `\n`
+        #     (so they are NOT real newlines in the script source), and the 
delimiter is unique
+        #     enough that github will never produce it as a structural line of 
the JSON output;
+        #   * `cat` writes the bytes verbatim to a file -- it is not eval'd.
+        # Whatever junk a malicious PR puts in title/body therefore lands 
inside a JSON file
+        # consumed by breeze, never executed as shell.
+        shell: bash
+        run: |  # zizmor: ignore[template-injection]
+          cat > "${RUNNER_TEMP}/github_context.json" << 
'__GITHUB_CONTEXT_END__'
+          ${{ toJson(github) }}
+          __GITHUB_CONTEXT_END__
       - name: "Get information about the Workflow"
         id: source-run-info
         run: breeze ci get-workflow-info 2>> ${GITHUB_OUTPUT}
         env:
           SKIP_BREEZE_SELF_UPGRADE_CHECK: "true"
+          GITHUB_CONTEXT_INPUT: "${{ runner.temp }}/github_context.json"
       - name: Selective checks
         id: selective-checks
         env:
           PR_LABELS: "${{ steps.source-run-info.outputs.pr-labels }}"
           COMMIT_REF: "${{ github.sha }}"
           VERBOSE: "false"
+          GITHUB_CONTEXT_INPUT: "${{ runner.temp }}/github_context.json"
         run: breeze ci selective-check 2>> ${GITHUB_OUTPUT}
       - name: env
         run: printenv
         env:
           PR_LABELS: ${{ steps.source-run-info.outputs.pr-labels }}
-          GITHUB_CONTEXT: ${{ toJson(github) }}
 
   print-platform-arm:
     name: "Platform: ARM"
diff --git a/.github/workflows/publish-docs-to-s3.yml 
b/.github/workflows/publish-docs-to-s3.yml
index c7e39d9f321..31be5af98fc 100644
--- a/.github/workflows/publish-docs-to-s3.yml
+++ b/.github/workflows/publish-docs-to-s3.yml
@@ -77,7 +77,6 @@ jobs:
     name: "Build Info"
     runs-on: ["ubuntu-24.04"]
     env:
-      GITHUB_CONTEXT: ${{ toJson(github) }}
       VERBOSE: true
       REF: ${{ inputs.ref }}
       INCLUDE_DOCS: ${{ inputs.include-docs }}
diff --git a/.github/workflows/release_dockerhub_image.yml 
b/.github/workflows/release_dockerhub_image.yml
index f3efcb67c2f..a1326e74d76 100644
--- a/.github/workflows/release_dockerhub_image.yml
+++ b/.github/workflows/release_dockerhub_image.yml
@@ -53,7 +53,6 @@ jobs:
       amd-runners: ${{ steps.selective-checks.outputs.amd-runners }}
       arm-runners: ${{ steps.selective-checks.outputs.arm-runners }}
     env:
-      GITHUB_CONTEXT: ${{ toJson(github) }}
       VERBOSE: true
       AIRFLOW_VERSION: ${{ github.event.inputs.airflowVersion }}
       AMD_ONLY: ${{ github.event.inputs.amdOnly }}
@@ -92,10 +91,20 @@ jobs:
           persist-credentials: false
       - name: "Install Breeze"
         uses: ./.github/actions/breeze
+      - name: "Save github context to file"
+        # See ci-amd-arm.yml for the full rationale: avoids ARG_MAX on big PRs 
by writing the
+        # github context to a file, and the single-quoted heredoc makes the 
zizmor
+        # template-injection finding a false positive (no bash expansion 
happens inside it).
+        shell: bash
+        run: |  # zizmor: ignore[template-injection]
+          cat > "${RUNNER_TEMP}/github_context.json" << 
'__GITHUB_CONTEXT_END__'
+          ${{ toJson(github) }}
+          __GITHUB_CONTEXT_END__
       - name: Selective checks
         id: selective-checks
         env:
           VERBOSE: "false"
+          GITHUB_CONTEXT_INPUT: "${{ runner.temp }}/github_context.json"
         run: breeze ci selective-check 2>> ${GITHUB_OUTPUT}
       - name: "Check airflow version"
         id: check-airflow-version
diff --git a/.github/workflows/update-constraints-on-push-stable.yml 
b/.github/workflows/update-constraints-on-push-stable.yml
index fcacc09a6bb..71a20ad357d 100644
--- a/.github/workflows/update-constraints-on-push-stable.yml
+++ b/.github/workflows/update-constraints-on-push-stable.yml
@@ -36,8 +36,6 @@ jobs:
   build-info:
     name: "Build info"
     runs-on: ["ubuntu-22.04"]
-    env:
-      GITHUB_CONTEXT: ${{ toJson(github) }}
     outputs:
       default-branch: ${{ steps.selective-checks.outputs.default-branch }}
       default-constraints-branch: ${{ 
steps.selective-checks.outputs.default-constraints-branch }}
@@ -61,12 +59,22 @@ jobs:
       - name: "Install Breeze"
         uses: ./.github/actions/breeze
         id: breeze
+      - name: "Save github context to file"
+        # See ci-amd-arm.yml for the full rationale: avoids ARG_MAX on big PRs 
by writing the
+        # github context to a file, and the single-quoted heredoc makes the 
zizmor
+        # template-injection finding a false positive (no bash expansion 
happens inside it).
+        shell: bash
+        run: |  # zizmor: ignore[template-injection]
+          cat > "${RUNNER_TEMP}/github_context.json" << 
'__GITHUB_CONTEXT_END__'
+          ${{ toJson(github) }}
+          __GITHUB_CONTEXT_END__
       - name: Selective checks
         id: selective-checks
         env:
           PR_LABELS: "[]"
           COMMIT_REF: "${{ github.sha }}"
           VERBOSE: "false"
+          GITHUB_CONTEXT_INPUT: "${{ runner.temp }}/github_context.json"
         run: breeze ci selective-check 2>> ${GITHUB_OUTPUT}
 
   build-ci-images:
diff --git a/.github/workflows/update-constraints-on-push.yml 
b/.github/workflows/update-constraints-on-push.yml
index ea6562b3118..eb9b202e581 100644
--- a/.github/workflows/update-constraints-on-push.yml
+++ b/.github/workflows/update-constraints-on-push.yml
@@ -39,8 +39,6 @@ jobs:
   build-info:
     name: "Build info"
     runs-on: ["ubuntu-22.04"]
-    env:
-      GITHUB_CONTEXT: ${{ toJson(github) }}
     outputs:
       default-branch: ${{ steps.selective-checks.outputs.default-branch }}
       default-constraints-branch: ${{ 
steps.selective-checks.outputs.default-constraints-branch }}
@@ -64,12 +62,22 @@ jobs:
       - name: "Install Breeze"
         uses: ./.github/actions/breeze
         id: breeze
+      - name: "Save github context to file"
+        # See ci-amd-arm.yml for the full rationale: avoids ARG_MAX on big PRs 
by writing the
+        # github context to a file, and the single-quoted heredoc makes the 
zizmor
+        # template-injection finding a false positive (no bash expansion 
happens inside it).
+        shell: bash
+        run: |  # zizmor: ignore[template-injection]
+          cat > "${RUNNER_TEMP}/github_context.json" << 
'__GITHUB_CONTEXT_END__'
+          ${{ toJson(github) }}
+          __GITHUB_CONTEXT_END__
       - name: Selective checks
         id: selective-checks
         env:
           PR_LABELS: "[]"
           COMMIT_REF: "${{ github.sha }}"
           VERBOSE: "false"
+          GITHUB_CONTEXT_INPUT: "${{ runner.temp }}/github_context.json"
         run: breeze ci selective-check 2>> ${GITHUB_OUTPUT}
 
   build-ci-images:
diff --git a/dev/breeze/doc/images/output_ci_selective-check.svg 
b/dev/breeze/doc/images/output_ci_selective-check.svg
index f08d5393e51..048652be298 100644
--- a/dev/breeze/doc/images/output_ci_selective-check.svg
+++ b/dev/breeze/doc/images/output_ci_selective-check.svg
@@ -1,4 +1,4 @@
-<svg class="rich-terminal" viewBox="0 0 1482 660.0" 
xmlns="http://www.w3.org/2000/svg";>
+<svg class="rich-terminal" viewBox="0 0 1482 708.8" 
xmlns="http://www.w3.org/2000/svg";>
     <!-- Generated with Rich https://www.textualize.io -->
     <style>
 
@@ -43,7 +43,7 @@
 
     <defs>
     <clipPath id="breeze-ci-selective-check-clip-terminal">
-      <rect x="0" y="0" width="1463.0" height="609.0" />
+      <rect x="0" y="0" width="1463.0" height="657.8" />
     </clipPath>
     <clipPath id="breeze-ci-selective-check-line-0">
     <rect x="0" y="1.5" width="1464" height="24.65"/>
@@ -117,9 +117,15 @@
 <clipPath id="breeze-ci-selective-check-line-23">
     <rect x="0" y="562.7" width="1464" height="24.65"/>
             </clipPath>
+<clipPath id="breeze-ci-selective-check-line-24">
+    <rect x="0" y="587.1" width="1464" height="24.65"/>
+            </clipPath>
+<clipPath id="breeze-ci-selective-check-line-25">
+    <rect x="0" y="611.5" width="1464" height="24.65"/>
+            </clipPath>
     </defs>
 
-    <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" 
x="1" y="1" width="1480" height="658" rx="8"/><text 
class="breeze-ci-selective-check-title" fill="#c5c8c6" text-anchor="middle" 
x="740" y="27">Command:&#160;ci&#160;selective-check</text>
+    <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" 
x="1" y="1" width="1480" height="706.8" rx="8"/><text 
class="breeze-ci-selective-check-title" fill="#c5c8c6" text-anchor="middle" 
x="740" y="27">Command:&#160;ci&#160;selective-check</text>
             <g transform="translate(26,22)">
             <circle cx="0" cy="0" r="7" fill="#ff5f57"/>
             <circle cx="22" cy="0" r="7" fill="#febc2e"/>
@@ -142,18 +148,20 @@
 </text><text class="breeze-ci-selective-check-r5" x="0" y="264" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-10)">│</text><text 
class="breeze-ci-selective-check-r6" x="390.4" y="264" textLength="73.2" 
clip-path="url(#breeze-ci-selective-check-line-10)">(TEXT)</text><text 
class="breeze-ci-selective-check-r5" x="1451.8" y="264" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-10)">│</text><text 
class="breeze-ci-selective-check-r1" x="1464" y="264" textLe [...]
 </text><text class="breeze-ci-selective-check-r5" x="0" y="288.4" 
textLength="1464" 
clip-path="url(#breeze-ci-selective-check-line-11)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-ci-selective-check-r1" x="1464" y="288.4" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-11)">
 </text><text class="breeze-ci-selective-check-r5" x="0" y="312.8" 
textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-12)">╭─</text><text 
class="breeze-ci-selective-check-r5" x="24.4" y="312.8" textLength="231.8" 
clip-path="url(#breeze-ci-selective-check-line-12)">&#160;GitHub&#160;parameters&#160;</text><text
 class="breeze-ci-selective-check-r5" x="256.2" y="312.8" textLength="1183.4" 
clip-path="url(#breeze-ci-selective-check-line-12)">──────────────────────────────────────
 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="337.2" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-13)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="337.2" textLength="231.8" 
clip-path="url(#breeze-ci-selective-check-line-13)">--github-event-name</text><text
 class="breeze-ci-selective-check-r1" x="329.4" y="337.2" textLength="610" 
clip-path="url(#breeze-ci-selective-check-line-13)">Name&#160;of&#160;the&#160;GitHub&#160;event&#160;that&#1
 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="361.6" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-14)">│</text><text 
class="breeze-ci-selective-check-r6" x="329.4" y="361.6" textLength="1049.2" 
clip-path="url(#breeze-ci-selective-check-line-14)">pull_request_review&#160;|&#160;pull_request_target&#160;|&#160;pull_request_workflow&#160;|&#160;push&#160;|&#160;schedule&#160;|&#160;</text><text
 class="breeze-ci-selective-check-r5" x="1451.8" y="361.6" textLe [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="386" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-15)">│</text><text 
class="breeze-ci-selective-check-r6" x="329.4" y="386" textLength="402.6" 
clip-path="url(#breeze-ci-selective-check-line-15)">workflow_dispatch&#160;|&#160;workflow_run)</text><text
 class="breeze-ci-selective-check-r5" x="1451.8" y="386" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-15)">│</text><text 
class="breeze-ci-selec [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="410.4" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-16)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="410.4" textLength="231.8" 
clip-path="url(#breeze-ci-selective-check-line-16)">--github-repository</text><text
 class="breeze-ci-selective-check-r7" x="280.6" y="410.4" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-16)">-g</text><text 
class="breeze-ci-selective-check-r1" x="3 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="434.8" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-17)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="434.8" textLength="231.8" 
clip-path="url(#breeze-ci-selective-check-line-17)">--github-actor&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r1" x="329.4" y="434.8" textLength="549" 
clip-path="url(#breeze-ci-selective-check-line-17)">Actor&#160;that&#160;triggered&#
 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="459.2" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-18)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="459.2" textLength="231.8" 
clip-path="url(#breeze-ci-selective-check-line-18)">--github-context&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r1" x="329.4" y="459.2" textLength="695.4" 
clip-path="url(#breeze-ci-selective-check-line-18)">GitHub&#160;context&#160;(JSON&#160;form
 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="483.6" 
textLength="1464" 
clip-path="url(#breeze-ci-selective-check-line-19)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-ci-selective-check-r1" x="1464" y="483.6" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-19)">
-</text><text class="breeze-ci-selective-check-r5" x="0" y="508" 
textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-20)">╭─</text><text 
class="breeze-ci-selective-check-r5" x="24.4" y="508" textLength="195.2" 
clip-path="url(#breeze-ci-selective-check-line-20)">&#160;Common&#160;options&#160;</text><text
 class="breeze-ci-selective-check-r5" x="219.6" y="508" textLength="1220" 
clip-path="url(#breeze-ci-selective-check-line-20)">─────────────────────────────────────────────────
 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="532.4" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-21)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="532.4" textLength="109.8" 
clip-path="url(#breeze-ci-selective-check-line-21)">--verbose</text><text 
class="breeze-ci-selective-check-r7" x="158.6" y="532.4" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-21)">-v</text><text 
class="breeze-ci-selective-check-r1" x="207.4" y="5 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="556.8" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-22)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="556.8" textLength="109.8" 
clip-path="url(#breeze-ci-selective-check-line-22)">--dry-run</text><text 
class="breeze-ci-selective-check-r7" x="158.6" y="556.8" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-22)">-D</text><text 
class="breeze-ci-selective-check-r1" x="207.4" y="5 [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="581.2" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-23)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="581.2" textLength="109.8" 
clip-path="url(#breeze-ci-selective-check-line-23)">--help&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r7" x="158.6" y="581.2" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-23)">-h</text><text 
class="breeze-ci-selective-check-r1" [...]
-</text><text class="breeze-ci-selective-check-r5" x="0" y="605.6" 
textLength="1464" 
clip-path="url(#breeze-ci-selective-check-line-24)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-ci-selective-check-r1" x="1464" y="605.6" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-24)">
+</text><text class="breeze-ci-selective-check-r5" x="0" y="337.2" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-13)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="337.2" textLength="268.4" 
clip-path="url(#breeze-ci-selective-check-line-13)">--github-event-name&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r1" x="366" y="337.2" textLength="610" 
clip-path="url(#breeze-ci-selective-check-line-13)">Name&#160;of&#160;the&#160;GitHub&#160;ev
 [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="361.6" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-14)">│</text><text 
class="breeze-ci-selective-check-r6" x="366" y="361.6" textLength="1073.6" 
clip-path="url(#breeze-ci-selective-check-line-14)">|&#160;pull_request_review&#160;|&#160;pull_request_target&#160;|&#160;pull_request_workflow&#160;|&#160;push&#160;|&#160;schedule&#160;|&#160;</text><text
 class="breeze-ci-selective-check-r5" x="1451.8" y="361.6" t [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="386" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-15)">│</text><text 
class="breeze-ci-selective-check-r6" x="366" y="386" textLength="402.6" 
clip-path="url(#breeze-ci-selective-check-line-15)">workflow_dispatch&#160;|&#160;workflow_run)</text><text
 class="breeze-ci-selective-check-r5" x="1451.8" y="386" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-15)">│</text><text 
class="breeze-ci-selecti [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="410.4" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-16)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="410.4" textLength="268.4" 
clip-path="url(#breeze-ci-selective-check-line-16)">--github-repository&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r7" x="317.2" y="410.4" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-16)">-g</text><text 
class="breeze-ci-select [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="434.8" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-17)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="434.8" textLength="268.4" 
clip-path="url(#breeze-ci-selective-check-line-17)">--github-actor&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r1" x="366" y="434.8" textLength="549" 
clip-path="url(#breeze-ci-selective-check-line-17)">Actor&#160;that& [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="459.2" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-18)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="459.2" textLength="268.4" 
clip-path="url(#breeze-ci-selective-check-line-18)">--github-context&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r1" x="366" y="459.2" textLength="695.4" 
clip-path="url(#breeze-ci-selective-check-line-18)">GitHub&#160;context&#160 
[...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="483.6" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-19)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="483.6" textLength="268.4" 
clip-path="url(#breeze-ci-selective-check-line-19)">--github-context-input</text><text
 class="breeze-ci-selective-check-r1" x="366" y="483.6" textLength="1073.6" 
clip-path="url(#breeze-ci-selective-check-line-19)">File&#160;input&#160;(might&#160;be&#160;`-`)&#160;wi
 [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="508" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-20)">│</text><text 
class="breeze-ci-selective-check-r4" x="366" y="508" textLength="195.2" 
clip-path="url(#breeze-ci-selective-check-line-20)">--github-context</text><text
 class="breeze-ci-selective-check-r1" x="561.2" y="508" textLength="744.2" 
clip-path="url(#breeze-ci-selective-check-line-20)">&#160;for&#160;large&#160;contexts&#160;that&#160;would&#160;exce
 [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="532.4" 
textLength="1464" 
clip-path="url(#breeze-ci-selective-check-line-21)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-ci-selective-check-r1" x="1464" y="532.4" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-21)">
+</text><text class="breeze-ci-selective-check-r5" x="0" y="556.8" 
textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-22)">╭─</text><text 
class="breeze-ci-selective-check-r5" x="24.4" y="556.8" textLength="195.2" 
clip-path="url(#breeze-ci-selective-check-line-22)">&#160;Common&#160;options&#160;</text><text
 class="breeze-ci-selective-check-r5" x="219.6" y="556.8" textLength="1220" 
clip-path="url(#breeze-ci-selective-check-line-22)">───────────────────────────────────────────
 [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="581.2" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-23)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="581.2" textLength="109.8" 
clip-path="url(#breeze-ci-selective-check-line-23)">--verbose</text><text 
class="breeze-ci-selective-check-r7" x="158.6" y="581.2" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-23)">-v</text><text 
class="breeze-ci-selective-check-r1" x="207.4" y="5 [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="605.6" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-24)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="605.6" textLength="109.8" 
clip-path="url(#breeze-ci-selective-check-line-24)">--dry-run</text><text 
class="breeze-ci-selective-check-r7" x="158.6" y="605.6" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-24)">-D</text><text 
class="breeze-ci-selective-check-r1" x="207.4" y="6 [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="630" 
textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-25)">│</text><text 
class="breeze-ci-selective-check-r4" x="24.4" y="630" textLength="109.8" 
clip-path="url(#breeze-ci-selective-check-line-25)">--help&#160;&#160;&#160;</text><text
 class="breeze-ci-selective-check-r7" x="158.6" y="630" textLength="24.4" 
clip-path="url(#breeze-ci-selective-check-line-25)">-h</text><text 
class="breeze-ci-selective-check-r1" x="20 [...]
+</text><text class="breeze-ci-selective-check-r5" x="0" y="654.4" 
textLength="1464" 
clip-path="url(#breeze-ci-selective-check-line-26)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-ci-selective-check-r1" x="1464" y="654.4" textLength="12.2" 
clip-path="url(#breeze-ci-selective-check-line-26)">
 </text>
     </g>
     </g>
diff --git a/dev/breeze/doc/images/output_ci_selective-check.txt 
b/dev/breeze/doc/images/output_ci_selective-check.txt
index 1146caaf584..49fcc692fa5 100644
--- a/dev/breeze/doc/images/output_ci_selective-check.txt
+++ b/dev/breeze/doc/images/output_ci_selective-check.txt
@@ -1 +1 @@
-2c277ba01e5dc00d3db1a67dfd0b480b
+dece9e901b05dabcb3af55c27b61410d
diff --git a/dev/breeze/src/airflow_breeze/commands/ci_commands.py 
b/dev/breeze/src/airflow_breeze/commands/ci_commands.py
index b8d41383713..f05e6fa04c2 100644
--- a/dev/breeze/src/airflow_breeze/commands/ci_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/ci_commands.py
@@ -241,6 +241,13 @@ def get_changed_files(commit_ref: str | None) -> 
tuple[str, ...]:
     type=str,
     default="",
 )
[email protected](
+    "--github-context-input",
+    help="File input (might be `-`) with JSON-formatted github context. "
+    "Use this instead of --github-context for large contexts that would exceed 
ARG_MAX as an env var.",
+    type=click.File("rt"),
+    envvar="GITHUB_CONTEXT_INPUT",
+)
 @option_verbose
 @option_dry_run
 def selective_check(
@@ -252,10 +259,16 @@ def selective_check(
     github_repository: str,
     github_actor: str,
     github_context: str,
+    github_context_input: StringIO | None,
 ):
     try:
         from airflow_breeze.utils.selective_checks import SelectiveChecks
 
+        if github_context and github_context_input:
+            console_print("[error]You can only specify one of --github-context 
or --github-context-input")
+            sys.exit(1)
+        if github_context_input:
+            github_context = github_context_input.read()
         github_context_dict = json.loads(github_context) if github_context 
else {}
         github_event = GithubEvents(github_event_name)
         if commit_ref is not None:
diff --git a/dev/breeze/src/airflow_breeze/commands/ci_commands_config.py 
b/dev/breeze/src/airflow_breeze/commands/ci_commands_config.py
index 5e3593f18cf..ae5bc64a5b7 100644
--- a/dev/breeze/src/airflow_breeze/commands/ci_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/ci_commands_config.py
@@ -55,6 +55,7 @@ CI_PARAMETERS: dict[str, list[dict[str, str | list[str]]]] = {
                 "--github-repository",
                 "--github-actor",
                 "--github-context",
+                "--github-context-input",
             ],
         },
     ],

Reply via email to