fix(ci): avoid "Argument list too long" in yarn-dedupe-push#7666
fix(ci): avoid "Argument list too long" in yarn-dedupe-push#7666
Conversation
The base64-encoded yarn.lock content was passed as a shell argument to `gh api`, exceeding the Linux ARG_MAX limit. Write the base64 output to a temp file and use `jq --rawfile` + `gh api --input -` to keep large payloads off the command line.
Overall package sizeSelf size: 4.89 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.6 | 81.92 kB | 816.75 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
BenchmarksBenchmark execution time: 2026-03-04 11:26:17 Comparing candidate commit e2620ff in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 230 metrics, 30 unstable metrics. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7666 +/- ##
==========================================
- Coverage 80.29% 80.28% -0.01%
==========================================
Files 738 738
Lines 31897 31897
==========================================
- Hits 25611 25610 -1
- Misses 6286 6287 +1 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The base64-encoded yarn.lock content was passed as a shell argument to `gh api`, exceeding the Linux ARG_MAX limit. Write the base64 output to a temp file and use `jq --rawfile` + `gh api --input -` to keep large payloads off the command line.
The base64-encoded yarn.lock content was passed as a shell argument to `gh api`, exceeding the Linux ARG_MAX limit. Write the base64 output to a temp file and use `jq --rawfile` + `gh api --input -` to keep large payloads off the command line.

What does this PR do?
Fixes the
yarn-dedupe-pushCI job which fails withArgument list too long(exit code 126) when trying to push a deduplicatedyarn.lockvia the GitHub API.The base64-encoded
yarn.lockcontent was being stored in a shell variable and passed as a command-line argument togh api, which exceeds the LinuxARG_MAXlimit. The fix writes the base64 output to a temp file and usesjq --rawfileto read it directly, piping the constructed JSON body intogh api --input -so the large payload never touches the command line.Motivation
The
yarn-dedupe-pushjob in.github/workflows/project.ymlstarted failing asyarn.lockgrew large enough for its base64 encoding to exceed the ~2MB argument limit:See: https://github.com/DataDog/dd-trace-js/actions/runs/22666593033/job/65699811583?pr=7665