From ff3a28be721834fdbf2e5ee5da79b08b0ebc97d7 Mon Sep 17 00:00:00 2001 From: "devsy-app[bot]" <277138668+devsy-app[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 12:25:46 +0000 Subject: [PATCH 1/2] test(e2e): cover docker retry deadline sentinel Add TestExecWithDockerRetry_ContextDeadlineExceeded, mirroring the existing SSH-variant test. execWithDockerRetry context-deadline path was uncovered while the SSH sibling was tested; flaky up-provider-podman runs hit this timeout path. The test asserts the raw context.DeadlineExceeded sentinel is returned (not the after-N-attempts wrapping) so callers can distinguish a timeout from a real failure. --- e2e/framework/retry_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/e2e/framework/retry_test.go b/e2e/framework/retry_test.go index a5a753d44..2d4ae29bd 100644 --- a/e2e/framework/retry_test.go +++ b/e2e/framework/retry_test.go @@ -286,6 +286,34 @@ func TestExecWithDockerRetry_ContextCanceled(t *testing.T) { assert.NotContains(t, err.Error(), "after") } +// TestExecWithDockerRetry_ContextDeadlineExceeded covers the spec-timeout path +// seen in flaky up-provider-podman runs: when the context deadline fires during +// retries, the raw context.DeadlineExceeded sentinel must be returned (not the +// "after N attempts" wrapping) so callers can distinguish a timeout from a real +// failure. Mirrors TestExecWithSSHRetry_ContextDeadlineExceeded. +func TestExecWithDockerRetry_ContextDeadlineExceeded(t *testing.T) { + t.Helper() + origDocker := dockerPullBackoff + dockerPullBackoff = wait.Backoff{ + Steps: origDocker.Steps, + Duration: 200 * time.Millisecond, + Factor: 1.0, + Jitter: 0, + } + t.Cleanup(func() { dockerPullBackoff = origDocker }) + + ctx, cancel := context.WithTimeout(context.Background(), 20*time.Millisecond) + t.Cleanup(cancel) + _, _, err := execWithDockerRetry(ctx, + func(context.Context) (string, string, error) { + return "", "i/o timeout", fmt.Errorf("pull failed") + }, + ) + require.Error(t, err) + assert.ErrorIs(t, err, context.DeadlineExceeded) + assert.NotContains(t, err.Error(), "after") +} + func TestExecWithSSHRetry_SuccessFirstTry(t *testing.T) { withFastBackoffs(t) calls := 0 From 686a80a60559f01c104f2b1d7557bcdc7ec84d14 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 17 Aug 2026 00:20:17 -0500 Subject: [PATCH 2/2] style: cleanup comments --- e2e/framework/retry_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/e2e/framework/retry_test.go b/e2e/framework/retry_test.go index 2d4ae29bd..b88ece04d 100644 --- a/e2e/framework/retry_test.go +++ b/e2e/framework/retry_test.go @@ -286,11 +286,6 @@ func TestExecWithDockerRetry_ContextCanceled(t *testing.T) { assert.NotContains(t, err.Error(), "after") } -// TestExecWithDockerRetry_ContextDeadlineExceeded covers the spec-timeout path -// seen in flaky up-provider-podman runs: when the context deadline fires during -// retries, the raw context.DeadlineExceeded sentinel must be returned (not the -// "after N attempts" wrapping) so callers can distinguish a timeout from a real -// failure. Mirrors TestExecWithSSHRetry_ContextDeadlineExceeded. func TestExecWithDockerRetry_ContextDeadlineExceeded(t *testing.T) { t.Helper() origDocker := dockerPullBackoff