Skip to content

test(e2e): fix flaky CA-secret race in gateway-accepted#215

Merged
scotwells merged 1 commit into
mainfrom
test/fix-e2e-ca-secret-race
Jun 23, 2026
Merged

test(e2e): fix flaky CA-secret race in gateway-accepted#215
scotwells merged 1 commit into
mainfrom
test/fix-e2e-ca-secret-race

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

What

Fixes a flaky failure in the gateway-accepted chainsaw e2e test.

Why

The Create CA step creates a cert-manager CA Certificate and then immediately runs a script that copies the resulting secret into envoy-gateway-system — with no wait in between. cert-manager has to issue the self-signed CA and write the secret first; on a slow runner the copy runs too early and fails:

Error from server (NotFound): secrets "e2e-chainsaw-..." not found
error: no objects passed to apply

exit status 1 → the suite fails. Confirmed flaky: the same branch produced both passing and failing runs on identical code.

Fix

Add an assert that the CA Certificate is Ready before the copy script (cert-manager writes the secret before marking the cert Ready), making the step deterministic.

Notes

🤖 Generated with Claude Code

The gateway-accepted test created a cert-manager CA Certificate and immediately
copied its secret into envoy-gateway-system, racing issuance. On slow runners the
secret didn't exist yet, failing with "secrets <name> not found / no objects
passed to apply" and flaking the suite. Assert the Certificate is Ready first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scotwells scotwells marked this pull request as ready for review June 23, 2026 21:23
@scotwells scotwells requested review from a team and savme June 23, 2026 21:23
@scotwells scotwells merged commit a474ece into main Jun 23, 2026
11 checks passed
@scotwells scotwells deleted the test/fix-e2e-ca-secret-race branch June 23, 2026 21:32
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.

2 participants