fix(release): stage PGO blob through --rawfile to avoid ARG_MAX#2421
Merged
Conversation
`jq --arg content "$(base64 -w0 <default.pgo)" ...` failed with "Argument list too long" on the runner when committing v1.12.3: the encoded PGO profile is ~2 MB and exceeds ARG_MAX. Write the base64 to a tmpfile and pass it via --rawfile, which reads from disk. https://github.com/php/frankenphp/actions/runs/25914409401
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the GitHub Actions release workflow failure caused by exceeding ARG_MAX when passing a large (~2 MB base64-encoded) PGO profile blob via jq --arg, by staging the base64 content to disk and having jq read it with --rawfile.
Changes:
- Update
make_blob()inrelease.yamlto writebase64 -w0output to a temp file and pass it tojqvia--rawfileinstead of embedding the blob in argv.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Per Copilot review: with set -euo pipefail, a failure in base64, jq, or gh api inside make_blob short-circuited before the rm. Wrap the function body in a subshell and trap EXIT so cleanup always runs.
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.
Summary
The
Commit and tag via GitHub APIstep inrelease.yamlblew up on its first real dispatch (https://github.com/php/frankenphp/actions/runs/25914409401):jq --arg content "$(base64 -w0 <default.pgo)" ...was passing the ~2 MB base64-encoded PGO blob as a CLI argument, which exceeds the runner'sARG_MAX.Fix: stage the base64 in a tmpfile and feed it via
--rawfileso jq reads it from disk, not the argv.go.modandgo.sumkeep going through--rawfilefor consistency.This needs to land before the next release dispatch can succeed.