Skip to content

fix(e2e): make act container start and CLI tar-copy deterministic - #342

Merged
joshua-temple merged 2 commits into
mainfrom
fix/e2e-container-timing-flakes
Jun 25, 2026
Merged

joshua-temple merged 2 commits into
mainfrom
fix/e2e-container-timing-flakes

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

Two e2e-harness infra flakes.

Fix

  • Cold-pull-aware explicit startup budget on the act readiness probe (still fails closed if the container never becomes runnable).
  • Cache the built CLI bytes once and copy the same immutable slice via CopyToContainer([]byte), so tar header size and payload cannot drift; a thin fail-closed retry covers genuine transient daemon blips.

New no-Docker invariant tests prove both fixes (TestCopyCLIToContainer_*, TestStableSliceTarSizeMatches, TestActStartupBudgets). The live Docker paths run in CI. Closes #336, closes #338.

Two e2e-harness infra flakes hardened at the root. The act runner readiness probe inherited testcontainers' 60s default, too tight for a cold image pull, so a cold runner timed out though the container came up; set an explicit cold-pull-aware startup budget that still fails closed. The CLI tar-copy used CopyFileToContainer, which stats the file for the tar header then streams the bytes separately, a TOCTOU that yielded 'archive/tar: write too long'; cache the built binary bytes once and copy the same immutable slice so header size and payload cannot drift, with a thin fail-closed retry over genuine transient daemon blips. Closes #336, closes #338.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 59febb2 into main Jun 25, 2026
13 checks passed
@joshua-temple
joshua-temple deleted the fix/e2e-container-timing-flakes branch June 25, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake(test): stabilize TestActRunner_Start container-start timeout on a cold image flake(e2e): fix the tar-copy race in the container file copy

1 participant