Skip to content

Make e2e ConfigureWithCleanup retry outlast a calico-apiserver restart#13044

Open
caseydavenport wants to merge 1 commit into
projectcalico:masterfrom
caseydavenport:casey-e2e-apiserver-retry-budget
Open

Make e2e ConfigureWithCleanup retry outlast a calico-apiserver restart#13044
caseydavenport wants to merge 1 commit into
projectcalico:masterfrom
caseydavenport:casey-e2e-apiserver-retry-budget

Conversation

@caseydavenport

Copy link
Copy Markdown
Member

e2e specs that tune cluster config through ConfigureWithCleanup intermittently fail in a [BeforeEach] with "the server is currently unable to handle the request" when calico-apiserver is rolling. The helper already retries that 503, but the budget gave up after ~13s, well short of a real apiserver restart.

The retry budget had a bug: wait.Backoff zeroes its remaining Steps the moment Duration*Factor exceeds Cap, so the "8 steps / 10s cap" exponential backoff actually quit after ~7 attempts over ~13s. This switches to a fixed 4s interval spanning ~2 minutes so the full budget is spent, and adds a test that pins the budget so it can't silently shrink again.

This only covers the ConfigureWithCleanup path. The same apiserver-outage window also breaks specs that hit the v3 API via discovery/RESTMapper or via Voltron; hardening those is a follow-up.

None

The retry uses a fixed 4s interval spanning ~2 minutes so a rolling
calico-apiserver is ridden out. A capped exponential backoff stops early:
wait.Backoff zeroes Steps once Duration*Factor exceeds Cap, so the prior
budget gave up after ~13s.
@caseydavenport caseydavenport requested a review from a team as a code owner June 22, 2026 20:37
Copilot AI review requested due to automatic review settings June 22, 2026 20:37
@marvin-tigera marvin-tigera added this to the Calico v3.33.0 milestone Jun 22, 2026
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@caseydavenport caseydavenport added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact and removed release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jun 22, 2026
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented and removed docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact labels Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-pr-required Change is not yet documented release-note-required Change has user-facing impact (no matter how small)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants