fix(e2e): make act container start and CLI tar-copy deterministic - #342
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two e2e-harness infra flakes.
TestActRunner_Startcold-image timeout: the act readiness probe inherited testcontainers' 60s default, too tight for a first-run image pull, so a cold runner timed out though the container came up.archive/tar: write too long: the CLI tar-copy usedCopyFileToContainer, which stats the file for the tar header then streams the bytes separately, a TOCTOU where any size drift fails the copy.Fix
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.