Error: "argument list too long" (because of large BULIDKITE_PLUGINS env var)
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
**Is your feature request related to a problem? Please describe.**
We use this [monorepo plugin](https://github.com/monebag/monorepo-diff-buildkite-plugin) which seems to pass it's configurations via encoded JSON through the BUILDKITE_PLUGINS environment variable. We recently found the limits of that, and have the following error when running the step:
```
fork/exec /buildkite-agent: argument list too long
```
This seems closely related to the existing (resolved) issues regarding long Git commit messages and the BUILDKITE_MESSAGE env var: https://github.com/buildkite/agent/pull/1302 and https://github.com/buildkite/agent/pull/1307.
**Describe the solution you'd like**
It would be nice if the BUILDKITE_PLUGINS env var could accept longer strings (and maybe generalized to other env vars?) Not being super familiar to Buildkite and the source code, I'm not sure if this is actually possible, but hoping someone here can advise if this is one potential solution. I would argue this is not an unreasonable feature to add, since it seems not unreasonable that plugins could have more extensive configurations.
**Describe alternatives you've considered**
As a short-term workaround, we've split up the Buildkite Steps that run the Monorepo plugin. This works for now, but scales based on the number of applications/files we've configured with the plugin, and will likely break for us in the future once again.
Another alternative is changing the Monorepo plugin, but I'm unfamiliar with how Buildkite plugins work, so maybe there isn't a great path forwards from that perspective?
**Additional context**
As an attempted fix, we increased the stack size limit (`ulimit -s`) on our Buildkite agents, with no effect.
Contributor guide
Assessment
This issue has not been assessed yet.