Skip to content

fix(test): wait for CA Certificate Ready before reading its secret#180

Merged
ecv merged 1 commit into
mainfrom
fix/chainsaw-cert-race
Jul 13, 2026
Merged

fix(test): wait for CA Certificate Ready before reading its secret#180
ecv merged 1 commit into
mainfrom
fix/chainsaw-cert-race

Conversation

@drewr

@drewr drewr commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The gateway-accepted chainsaw test creates a cert-manager Certificate and immediately runs a script that reads the secret cert-manager is supposed to produce. There's no wait between the two, so the script can race ahead of the issuance and fail with:

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

Asserting Certificate.status.conditions[Ready]=True between the Certificate create and the secret-copy script gates everything that depends on the issued secret, including the CA ClusterIssuer that follows.

Example failure: https://github.com/datum-cloud/network-services-operator/actions/runs/27240379708/job/80442454016 (surfaced in #179, which makes no test-relevant code changes)

The gateway-accepted chainsaw test creates a cert-manager Certificate
and immediately runs a script that reads the secret cert-manager is
supposed to produce. With no wait between the two, the script can run
before cert-manager has issued the secret, producing:

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

Asserting Certificate.status.conditions[Ready]=True between the
Certificate create and the secret-copy script gates everything that
depends on the issued secret, including the CA ClusterIssuer.

Example failure: https://github.com/datum-cloud/network-services-operator/actions/runs/27240379708/job/80442454016
(surfaced in PR #179)
@ecv ecv self-requested a review July 13, 2026 05:11
@ecv ecv merged commit d38d39c into main Jul 13, 2026
11 checks passed
@ecv ecv deleted the fix/chainsaw-cert-race branch July 13, 2026 05:12
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