Skip to content

Sync fails with ENOBUFS on large commit ranges #101

@sbennett33

Description

@sbennett33

Summary

linear-release sync crashes with ENOBUFS on large commit ranges because the git helpers in src/git.ts use execSync/execFileSync without setting maxBuffer, inheriting Node's 1 MB default.

Repro

We run the CLI via linear/linear-release-action@v0 on every push to main and to a production branch.

The action is invoked per-component via a matrix:

strategy:
matrix:
  component: [brand, platform, infra, data]
steps:
- uses: actions/checkout@v4
  with: { fetch-depth: 0 }
- uses: linear/linear-release-action@v0
  with:
    access_key: ${{ secrets[...] }}

Only the platform matrix entry fails, it has the largest subtree and the broadest pipeline path filter, so the git output on a multi-day production batch crosses the 1 MB cap. The other three components stay under the limit and succeed.

Error

{"level":"error","msg":"Error: spawnSync /bin/sh ENOBUFS (stdout or stderr buffer reached maxBuffer size limit)"}
##[error]Process completed with exit code 1.

Root cause

src/git.ts calls execSync / execFileSync with no maxBuffer option, so Node uses the 1 MB default. Any single git invocation whose stdout exceeds that (git log over a wide range with path filters is the obvious one) will throw ENOBUFS and abort the sync, dropping the entire release.

Suggested fix

Either:

  1. Pass maxBuffer: Infinity (or a large explicit value, e.g. 256 MB) on the execSync/execFileSync calls in src/git.ts
  2. Switch to streaming spawn and consume stdout incrementally

Version

linear/linear-release-action@v0 (resolves to the bundled CLI in v0.14.0).

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions