Skip to content

fix(ci): avoid "Argument list too long" in yarn-dedupe-push#7666

Merged
BridgeAR merged 1 commit intomasterfrom
watson/fix-yarn-dedupe
Mar 5, 2026
Merged

fix(ci): avoid "Argument list too long" in yarn-dedupe-push#7666
BridgeAR merged 1 commit intomasterfrom
watson/fix-yarn-dedupe

Conversation

@watson
Copy link
Copy Markdown
Collaborator

@watson watson commented Mar 4, 2026

What does this PR do?

Fixes the yarn-dedupe-push CI job which fails with Argument list too long (exit code 126) when trying to push a deduplicated yarn.lock via the GitHub API.

The base64-encoded yarn.lock content was being stored in a shell variable and passed as a command-line argument to gh api, which exceeds the Linux ARG_MAX limit. The fix writes the base64 output to a temp file and uses jq --rawfile to read it directly, piping the constructed JSON body into gh api --input - so the large payload never touches the command line.

Motivation

The yarn-dedupe-push job in .github/workflows/project.yml started failing as yarn.lock grew large enough for its base64 encoding to exceed the ~2MB argument limit:

/home/runner/work/_temp/....sh: line 7: /usr/bin/gh: Argument list too long

See: https://github.com/DataDog/dd-trace-js/actions/runs/22666593033/job/65699811583?pr=7665

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.
@watson watson self-assigned this Mar 4, 2026
Copy link
Copy Markdown
Collaborator Author

watson commented Mar 4, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Overall package size

Self size: 4.89 MB
Deduped: 5.74 MB
No deduping: 5.74 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

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 4, 2026

Benchmarks

Benchmark execution time: 2026-03-04 11:26:17

Comparing candidate commit e2620ff in PR branch watson/fix-yarn-dedupe with baseline commit 0a08693 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 230 metrics, 30 unstable metrics.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.28%. Comparing base (0a08693) to head (e2620ff).
⚠️ Report is 1 commits behind head on master.

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     
Flag Coverage Δ
aiguard-macos 38.93% <ø> (-0.10%) ⬇️
aiguard-ubuntu 39.04% <ø> (-0.10%) ⬇️
aiguard-windows 38.78% <ø> (-0.10%) ⬇️
apm-capabilities-tracing-macos 48.83% <ø> (ø)
apm-capabilities-tracing-ubuntu 48.87% <ø> (ø)
apm-capabilities-tracing-windows 48.61% <ø> (ø)
apm-integrations-child-process 38.51% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-18 37.44% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-eol 37.91% <ø> (+0.04%) ⬆️
apm-integrations-oracledb 37.74% <ø> (-0.10%) ⬇️
appsec-express 55.36% <ø> (-0.07%) ⬇️
appsec-fastify 51.67% <ø> (-0.07%) ⬇️
appsec-graphql 51.86% <ø> (-0.07%) ⬇️
appsec-kafka 44.39% <ø> (-0.03%) ⬇️
appsec-ldapjs 44.03% <ø> (-0.08%) ⬇️
appsec-lodash 43.68% <ø> (-0.08%) ⬇️
appsec-macos 58.35% <ø> (-0.07%) ⬇️
appsec-mongodb-core 48.85% <ø> (-0.08%) ⬇️
appsec-mongoose 49.53% <ø> (-0.08%) ⬇️
appsec-mysql 50.89% <ø> (-0.07%) ⬇️
appsec-node-serialize 43.20% <ø> (-0.08%) ⬇️
appsec-passport 47.65% <ø> (-0.09%) ⬇️
appsec-postgres 50.64% <ø> (-0.07%) ⬇️
appsec-sourcing 42.60% <ø> (-0.08%) ⬇️
appsec-template 43.37% <ø> (-0.08%) ⬇️
appsec-ubuntu 58.43% <ø> (-0.07%) ⬇️
appsec-windows 58.21% <ø> (-0.07%) ⬇️
instrumentations-instrumentation-bluebird 32.31% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-body-parser 40.48% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-child_process 37.83% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 34.31% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-express 34.64% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.44% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-express-session 40.11% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-fs 31.92% <ø> (-0.11%) ⬇️
instrumentations-instrumentation-generic-pool 29.73% <ø> (ø)
instrumentations-instrumentation-http 39.84% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-knex 32.31% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-mongoose 33.45% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-multer 40.23% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-mysql2 38.30% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-passport 44.02% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-http 43.69% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-local 44.23% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-pg 37.73% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise 32.24% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 32.24% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-q 32.29% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-url 32.21% <ø> (-0.11%) ⬇️
instrumentations-instrumentation-when 32.26% <ø> (-0.10%) ⬇️
llmobs-ai 41.96% <ø> (-0.10%) ⬇️
llmobs-anthropic 40.30% <ø> (-0.09%) ⬇️
llmobs-bedrock 39.25% <ø> (-0.09%) ⬇️
llmobs-google-genai 39.83% <ø> (-0.09%) ⬇️
llmobs-langchain 39.76% <ø> (-0.08%) ⬇️
llmobs-openai 44.14% <ø> (-0.09%) ⬇️
llmobs-vertex-ai 40.02% <ø> (-0.16%) ⬇️
platform-core 31.53% <ø> (ø)
platform-esbuild 34.48% <ø> (ø)
platform-instrumentations-misc 43.94% <ø> (ø)
platform-shimmer 37.63% <ø> (ø)
platform-unit-guardrails 32.95% <ø> (ø)
plugins-azure-event-hubs 25.71% <ø> (ø)
plugins-azure-service-bus 25.07% <ø> (ø)
plugins-bullmq 43.73% <ø> (-0.10%) ⬇️
plugins-cassandra 37.78% <ø> (-0.10%) ⬇️
plugins-cookie 26.77% <ø> (ø)
plugins-cookie-parser 26.56% <ø> (ø)
plugins-crypto 26.79% <ø> (ø)
plugins-dd-trace-api 38.37% <ø> (-0.10%) ⬇️
plugins-express-mongo-sanitize 26.70% <ø> (ø)
plugins-express-session 26.51% <ø> (ø)
plugins-fastify 42.23% <ø> (-0.09%) ⬇️
plugins-fetch 38.33% <ø> (-0.10%) ⬇️
plugins-fs 38.61% <ø> (-0.10%) ⬇️
plugins-generic-pool 25.75% <ø> (ø)
plugins-google-cloud-pubsub 45.34% <ø> (-0.11%) ⬇️
plugins-grpc 40.93% <ø> (-0.09%) ⬇️
plugins-handlebars 26.75% <ø> (ø)
plugins-hapi 40.12% <ø> (-0.10%) ⬇️
plugins-hono 40.38% <ø> (-0.10%) ⬇️
plugins-ioredis 38.42% <ø> (-0.10%) ⬇️
plugins-knex 26.39% <ø> (ø)
plugins-ldapjs 24.24% <ø> (ø)
plugins-light-my-request 26.12% <ø> (ø)
plugins-limitd-client 32.60% <ø> (-0.10%) ⬇️
plugins-lodash 25.84% <ø> (ø)
plugins-mariadb 39.48% <ø> (-0.10%) ⬇️
plugins-memcached 38.17% <ø> (-0.10%) ⬇️
plugins-microgateway-core 39.16% <ø> (-0.10%) ⬇️
plugins-moleculer 40.50% <ø> (-0.10%) ⬇️
plugins-mongodb 39.19% <ø> (-0.10%) ⬇️
plugins-mongodb-core 39.03% <ø> (-0.10%) ⬇️
plugins-mongoose 38.85% <ø> (-0.10%) ⬇️
plugins-multer 26.51% <ø> (ø)
plugins-mysql 39.16% <ø> (-0.10%) ⬇️
plugins-mysql2 39.26% <ø> (-0.10%) ⬇️
plugins-node-serialize 26.81% <ø> (ø)
plugins-opensearch 37.62% <ø> (-0.10%) ⬇️
plugins-passport-http 26.57% <ø> (ø)
plugins-postgres 35.71% <ø> (-0.09%) ⬇️
plugins-process 26.79% <ø> (ø)
plugins-pug 26.77% <ø> (ø)
plugins-redis 38.89% <ø> (-0.10%) ⬇️
plugins-router 42.96% <ø> (-0.10%) ⬇️
plugins-sequelize 25.35% <ø> (ø)
plugins-test-and-upstream-amqp10 38.49% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-amqplib 43.82% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-apollo 39.02% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-avsc 38.70% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-bunyan 33.88% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-connect 40.78% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-graphql 40.13% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-koa 40.36% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-protobufjs 38.93% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-rhea 44.01% <ø> (-0.13%) ⬇️
plugins-undici 39.11% <ø> (-0.09%) ⬇️
plugins-url 26.79% <ø> (ø)
plugins-valkey 38.08% <ø> (-0.10%) ⬇️
plugins-vm 26.79% <ø> (ø)
plugins-winston 34.07% <ø> (-0.10%) ⬇️
plugins-ws 41.87% <ø> (-0.10%) ⬇️
profiling-macos 39.83% <ø> (-0.10%) ⬇️
profiling-ubuntu 39.95% <ø> (-0.10%) ⬇️
profiling-windows 41.16% <ø> (-0.47%) ⬇️
serverless-azure-functions-client 25.43% <ø> (ø)
serverless-azure-functions-eventhubs 25.43% <ø> (ø)
serverless-azure-functions-servicebus 25.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@watson watson requested a review from a team March 4, 2026 11:31
@BridgeAR BridgeAR merged commit 7a9217b into master Mar 5, 2026
821 of 823 checks passed
@BridgeAR BridgeAR deleted the watson/fix-yarn-dedupe branch March 5, 2026 10:35
dd-octo-sts Bot pushed a commit that referenced this pull request Mar 5, 2026
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.
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Mar 5, 2026
juan-fernandez pushed a commit that referenced this pull request Mar 5, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants