Repository navigation
Fix test-quarantine activation crash from oversized part1_data env var - #67338
Merged
Merged
Conversation
The daily test-quarantine workflow's activation job was failing with "An error occurred trying to start process '/usr/bin/bash' ... Argument list too long" (E2BIG). The pre_activation step computes ~225 KB of CI failure data (part1_data) and gh-aw passes it to the prompt-building steps as a single environment variable. Linux caps one env-var string at MAX_ARG_STRLEN (32 * 4 KiB page = 131072 bytes) during execve, so merely declaring that variable on a step makes the step die before it runs. This was latent until dotnet#67322 fixed token scrubbing: previously GitHub's secret detector skipped the whole output, so the env var resolved empty and never hit the limit; with scrubbing fixed the data now flows at full size and trips MAX_ARG_STRLEN. Split part1_data into 16 fixed, byte-bounded chunks (<=80000 bytes each, well under the limit), one per job output (part1_data_0..15), and concatenate the placeholders adjacently in the prompt so gh-aw's exact-string substitution reconstructs the JSON verbatim. Empty slots cost nothing, so total environment size is unchanged. Chunks split on UTF-8 character boundaries; a loud FATAL guards the (unreachable in practice, since json.dumps emits ASCII) case of overflow rather than silently truncating. Recompiled the lockfile with gh aw v0.79.8. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a recurring failure in the daily test-quarantine workflow where the activation job crashed with Argument list too long because a single large part1_data job output was being materialized as an oversized environment variable during prompt-building.
Changes:
- Split the
part1_dataJSON payload into 16 byte-bounded outputs (part1_data_0..15) and reassemble them in the prompt via adjacent placeholders. - Update the
pre_activationjob outputs to expose the chunked values instead of a singlepart1_data. - Regenerate
test-quarantine.lock.ymlwithgh aw compile(v0.79.8), reflecting the chunked env vars and other generated updates.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/test-quarantine.md | Implements chunking in the Part 1 aggregation script and updates the prompt to concatenate part1_data_0..15. |
| .github/workflows/test-quarantine.lock.yml | Regenerated compiled workflow to carry the new chunked outputs through prompt-building steps (and updates gh-aw metadata/tooling). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The daily
test-quarantineworkflow'sactivationjob has been failing (e.g. run 27902364302) at the Create prompt with built-in context step with:Root cause
The
pre_activationstep assembles ~225 KB of CI failure data (part1_data) and exposes it as a single job output. gh-aw turns the prompt's${{ needs.pre_activation.outputs.part1_data }}reference into a single environment variable declared on the three prompt-building steps. Linux caps one env-var string atMAX_ARG_STRLEN(32 * PAGE_SIZE= 131072 bytes) duringexecve— so a >128 KiB value makes the step'sbashfail to start, even though the step never actually uses the variable.This was latent until #67322 fixed token scrubbing. Before that, GitHub's secret detector was skipping the entire
part1_dataoutput (Skip output 'part1_data' since it may contain secret), so the env var resolved empty and never approached the limit. With scrubbing fixed, the data now flows at full size and tripsMAX_ARG_STRLEN.Fix
Split
part1_datainto 16 fixed, byte-bounded chunks (≤ 80000 bytes each, well under 131072), one perpre_activationoutput (part1_data_0..15). The prompt concatenates the 16 placeholders adjacently so gh-aw's exact-string (split().join()) substitution reconstructs the JSON verbatim. Key properties:ARG_MAXwas never the issue).FATALguards overflow rather than emitting truncated JSON (unreachable in practice —json.dumpsemits ASCII, so 16×80 KB comfortably covers the existingSAFE_OUTPUTcap).Only
.github/workflows/test-quarantine.mdwas hand-edited;test-quarantine.lock.ymlwas regenerated withgh awv0.79.8.Validation
gh aw compile→ 0 errors / 0 warnings.split().join()(no greedy-regex / prefix collisions betweenpart1_data_1andpart1_data_10).