Skip to content

ci: fix Argument list too long in triage workflows#26603

Merged
cocosheng-g merged 5 commits intomainfrom
fix-triage-workflow
May 6, 2026
Merged

ci: fix Argument list too long in triage workflows#26603
cocosheng-g merged 5 commits intomainfrom
fix-triage-workflow

Conversation

@cocosheng-g
Copy link
Copy Markdown
Contributor

@cocosheng-g cocosheng-g commented May 6, 2026

Summary

This PR fixes the Argument list too long error in both the Gemini Scheduled Issue Triage and Gemini Automated Issue Triage workflows by avoiding passing massive JSON arrays and text (containing full issue bodies) into bash environment variables. It also resolves a trusted workspace error when running the CLI via run-gemini-cli in a headless environment.

Details

For gemini-scheduled-issue-triage.yml:

  1. Refactored the Find untriaged issues and Get issue from event steps to output the JSON objects directly into files (no_area_issues.json, no_kind_issues.json, etc.) instead of saving them into bash variables.
  2. Used jq to merge and deduplicate the multiple JSON outputs into a single issues_to_triage.json file.
  3. Added the read_file tool to the allowed coreTools array in the Run Gemini Issue Analysis step, and updated the prompt to instruct Gemini to read the issues_to_triage.json file directly from the filesystem.

For gemini-automated-issue-triage.yml:

  1. Created a new Prepare Issue Data step to write the ISSUE_TITLE and ISSUE_BODY to an issue_context.md file rather than passing them to the AI action as environment variables.
  2. Added the read_file tool to the coreTools array and updated the prompt to instruct the AI to read the issue_context.md file.

For both workflows:

  • Exported GEMINI_CLI_TRUST_WORKSPACE: 'true' to explicitly authorize the CLI to run securely inside the GitHub Actions environment.

Related Issues

Closes #26602

How to Validate

  1. Go to the "Actions" tab on GitHub.
  2. Select the 📋 Gemini Scheduled Issue Triage or 🏷️ Gemini Automated Issue Triage workflow.
  3. Click "Run workflow" and select this PR branch (fix-triage-workflow).
  4. Ensure the job completes successfully and applies labels to the untriaged issues found without hitting size or trust errors.

Successful Verification Runs:

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@cocosheng-g cocosheng-g requested a review from a team as a code owner May 6, 2026 19:01
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Size Change: -4 B (0%)

Total Size: 34 MB

Filename Size Change
./bundle/chunk-26KBB3K3.js 0 B -2.78 MB (removed) 🏆
./bundle/chunk-4Y26G5HD.js 0 B -3.43 kB (removed) 🏆
./bundle/chunk-B6WJNIB2.js 0 B -49.2 kB (removed) 🏆
./bundle/chunk-CTHF2L2B.js 0 B -19.5 kB (removed) 🏆
./bundle/chunk-J6I3F544.js 0 B -12.5 kB (removed) 🏆
./bundle/chunk-KBS66IB4.js 0 B -14.8 MB (removed) 🏆
./bundle/chunk-KXX4NAFD.js 0 B -658 kB (removed) 🏆
./bundle/chunk-ZDKSRGC6.js 0 B -3.8 kB (removed) 🏆
./bundle/core-WLDM3424.js 0 B -48.8 kB (removed) 🏆
./bundle/devtoolsService-7QWWQON4.js 0 B -28 kB (removed) 🏆
./bundle/gemini-6NG7IBDB.js 0 B -584 kB (removed) 🏆
./bundle/interactiveCli-2IHDQIP3.js 0 B -1.29 MB (removed) 🏆
./bundle/liteRtServerManager-JO2W3PMV.js 0 B -2.11 kB (removed) 🏆
./bundle/oauth2-provider-37KXY7KD.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-A6A7ABTV.js 3.8 kB +3.8 kB (new file) 🆕
./bundle/chunk-AZQL4YEI.js 49.2 kB +49.2 kB (new file) 🆕
./bundle/chunk-JBY7AJWV.js 12.5 kB +12.5 kB (new file) 🆕
./bundle/chunk-JTYYBQRV.js 2.78 MB +2.78 MB (new file) 🆕
./bundle/chunk-NP62WSQW.js 658 kB +658 kB (new file) 🆕
./bundle/chunk-TXILSMNN.js 14.8 MB +14.8 MB (new file) 🆕
./bundle/chunk-VSU3RJH3.js 19.5 kB +19.5 kB (new file) 🆕
./bundle/chunk-X225YKW6.js 3.43 kB +3.43 kB (new file) 🆕
./bundle/core-YRMMYDUN.js 48.8 kB +48.8 kB (new file) 🆕
./bundle/devtoolsService-LF35JHG5.js 28 kB +28 kB (new file) 🆕
./bundle/gemini-OYRAS3HX.js 584 kB +584 kB (new file) 🆕
./bundle/interactiveCli-YMGTGJRA.js 1.29 MB +1.29 MB (new file) 🆕
./bundle/liteRtServerManager-VTTDES4M.js 2.11 kB +2.11 kB (new file) 🆕
./bundle/oauth2-provider-YU4PNVVG.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/chunk-VJSUVOZ4.js 1.97 MB 0 B
./bundle/cleanup-W5QGQGWU.js 0 B -932 B (removed) 🏆
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/examples/hooks/scripts/on-start.js 188 B 0 B
./bundle/examples/mcp-server/example.js 1.43 kB 0 B
./bundle/gemini.js 5.1 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-NGHTMHWQ.js 980 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/start-SWGNDDTU.js 0 B -652 B (removed) 🏆
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/cleanup-PVHZPJY7.js 932 B +932 B (new file) 🆕
./bundle/start-R3D23WEQ.js 652 B +652 B (new file) 🆕

compressed-size-action

@cocosheng-g cocosheng-g closed this May 6, 2026
@cocosheng-g cocosheng-g reopened this May 6, 2026
@cocosheng-g cocosheng-g requested a review from gundermanc May 6, 2026 19:13
Avoid loading large issue bodies into environment variables by using intermediate markdown files and the read_file tool.

Also explicitly trust the workspace for the headless CLI.
@gemini-cli gemini-cli Bot added the area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt label May 6, 2026
@cocosheng-g cocosheng-g changed the title ci: fix Argument list too long in triage workflow ci: fix Argument list too long in triage workflows May 6, 2026
@cocosheng-g cocosheng-g added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 4a10751 May 6, 2026
28 of 29 checks passed
@cocosheng-g cocosheng-g deleted the fix-triage-workflow branch May 6, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: Issue Triage workflows fail with Argument list too long

2 participants