Skip to content

fix(release): avoid jq ARG_MAX limit when encoding CRD files - #231

Merged
Kevin Rudde (kevinrudde) merged 1 commit into
mainfrom
fix-jq-arg-list-too-long
Jul 31, 2026
Merged

fix(release): avoid jq ARG_MAX limit when encoding CRD files#231
Kevin Rudde (kevinrudde) merged 1 commit into
mainfrom
fix-jq-arg-list-too-long

Conversation

@kevinrudde

@kevinrudde Kevin Rudde (kevinrudde) commented Jul 31, 2026

Copy link
Copy Markdown
Member

Problem

The release workflow's make pr on helm-charts step failed with:

/usr/bin/jq: Argument list too long
##[error]Process completed with exit code 126.

The per-file addition builder passed the whole base64-encoded file as a jq command-line --arg:

jq -n --arg path "$f" --arg contents "$(base64 -w0 "$f")" '{path:$path, contents:$contents}'

Large CRD manifests produce base64 strings that exceed ARG_MAX, so exec fails before jq runs.

Fix

Pipe the base64 contents into jq via stdin (-Rs) instead of passing it on argv — no argument-length limit:

base64 -w0 "$f" | jq -Rs --arg path "$f" '{path:$path, contents:.}'

@kevinrudde
Kevin Rudde (kevinrudde) merged commit b7c0378 into main Jul 31, 2026
4 checks passed
@kevinrudde
Kevin Rudde (kevinrudde) deleted the fix-jq-arg-list-too-long branch July 31, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants