Skip to content

fix(ci): cap the nested check suite's parallelism - #83

Merged
TomChv merged 1 commit into
mainfrom
fix/ci-check-parallelism
Oct 12, 2026
Merged

TomChv merged 1 commit into
mainfrom
fix/ci-check-parallelism

Conversation

@TomChv

@TomChv TomChv commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Problem

Three PRs in a row went red on engine-e-2-e/checks-check while main stayed green, with no failing assertion. The traces:

✘ withExec dagger check (disableDaggerInDagger: true) 4m42s ERROR
  CHECKS  ✔ 21 passed  ◐ 48 running
  Error: Post "http://dagger/query": unexpected EOF
  cleanup failed: ... shutdown: ... connection reset by peer

On another, the playground's engine service EXITED at 7m56s with 50 checks in flight; on a third, two checks were Cancelled - max execution time exceeded.

checksCheck runs the whole suite inside an engine that is itself inside one, with dagger check uncapped — so all ~70 checks start at once. The cheap ones finish; the rest (each building containers, installing packages, or running a registry service) sit in flight together until the inner engine is killed.

It is self-disguising: when the inner engine dies, the CLI prints every check still running as OK with identical durations, so both failing traces end in a green == CHECKS == ✔ 69 passed under a red exec. That is worth knowing independently of this fix — a check summary from a run whose command exited non-zero with a transport error is not a result.

Fix

Pass -j to the nested dagger check, and move the engine-dev pin so the flag exists.

-j / $DAGGER_CHECK_PARALLEL arrived in dagger/dagger#14467 on 2026-10-06; the pin was cbf69413 (2026-09-29), where dagger check -j 12 exits on an unknown flag in 4.4s with a USAGE dump — the first attempt at this PR did exactly that. The two halves are one change: the cap is unusable without the bump.

The pin moves to 55e112468d (2026-10-08), which is the engine this SDK's own verification runs against, and 10 days less stale.

The engine-side alternative does not work: --oci-max-parallelism exists in the pinned engine, but it is an engine-binary flag supplied by engine-dev's service args, not something the playground can set, and that revision's engine config schema has no parallelism field.

-j 12 is a calibration point, not a measurement: the suite died with ~50 in flight and passes on main with fewer checks than that, so the ceiling is somewhere between. The docstring records which way to move it — and that if a run is cancelled for exceeding its time budget rather than failing, the answer is to raise it, or to split the suite into per-group checks so each gets a budget of its own.

Verification

  • dagger -m .dagger/modules/engine-e2e functions loads and type-checks against engine-dev at the new pin, so its API did not drift between the two revisions (engineDev(ws:), installClient, service(sharedCache:) are all still as called).
  • The playground's workspace.lock is unchanged by the newer engine, so this should not make generate/stale red. Checked by running the playground's workspace config against 55e112468d and diffing the lock.
  • dagger.lock is untouched. (A local run added a redundant github.com/dagger/alpine refs/heads/main entry at the same SHA it already pins; that churn is reverted.)
  • The real test is CI on this PR: a green checks-check says the cap holds, and its duration says whether 12 is the right number.

@TomChv
TomChv marked this pull request as draft October 9, 2026 12:17
@TomChv TomChv changed the title fix(ci): cap the nested check suite's parallelism WIP fix(ci): the nested check suite needs a parallelism cap — pinned CLI has no -j Oct 9, 2026
@TomChv
TomChv force-pushed the fix/ci-check-parallelism branch 2 times, most recently from 209a3fc to b377884 Compare October 9, 2026 12:28
@TomChv TomChv changed the title WIP fix(ci): the nested check suite needs a parallelism cap — pinned CLI has no -j fix(ci): cap the nested check suite's parallelism Oct 9, 2026
@TomChv
TomChv marked this pull request as ready for review October 9, 2026 12:28
@TomChv
TomChv marked this pull request as draft October 9, 2026 15:48
@TomChv
TomChv force-pushed the fix/ci-check-parallelism branch from b377884 to 5f4e327 Compare October 9, 2026 15:48
@TomChv

TomChv commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

Stripped the pin bump from this PR — #84 moves the pairing to v1.0.0-beta.16, which is the oldest release carrying dagger check -j (dagger/dagger#14459). This now only adds the cap, so it needs #84 first; draft until then. CI on it will fail against the current pin, which is expected.

@TomChv
TomChv force-pushed the fix/ci-check-parallelism branch from 5f4e327 to e36c415 Compare October 12, 2026 10:03
@TomChv
TomChv marked this pull request as ready for review October 12, 2026 10:03
@TomChv

TomChv commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Rebased onto main now that #84 has landed. The pin is 2d95ef98b6 (v1.0.0-beta.16), which is the oldest release carrying dagger check -j, so the cap in this PR is now usable — its own CI run is what proves the flag is accepted and says whether 12 is the right number.

`checksCheck` runs the whole suite inside an engine that is itself inside
one, with `dagger check` uncapped — so every check starts at once. The cheap
ones finish and the remaining ~50, each building containers or running a
registry service, sit in flight together until the inner engine is killed:
`Post "http://dagger/query": unexpected EOF`, `connection reset by peer`, or
a run cancelled for exceeding its time budget. Seen on three PRs in a row,
each adding a check or two to a suite that was already at the ceiling, while
the same suite passes on main.

The failure is also disguised: when the inner engine dies the CLI prints
every check still running as passed, with identical durations, so the trace
ends in a green summary under a red exec.

`-j 12` is a calibration point rather than a measurement — the suite died
with ~50 in flight and passes on main with fewer checks than that. The
docstring says which way to move it, and notes splitting the suite into
per-group checks as the alternative that gives each part its own time budget.

Stacks on the beta.16 pairing: `-j` needs a CLI carrying dagger/dagger#14459,
so this is only usable once the engine-dev pin has moved.

Signed-off-by: Tom Chauveau <[email protected]>
@TomChv
TomChv force-pushed the fix/ci-check-parallelism branch from e36c415 to c6a78cb Compare October 12, 2026 14:40
@TomChv
TomChv merged commit d97f678 into main Oct 12, 2026
5 checks passed
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.

1 participant