Skip to content

ci: Run the test suite through one Makefile target - #863

Merged
vvoytovych merged 1 commit into
mainfrom
ci/envtest-version-once
Nov 5, 2026
Merged

vvoytovych merged 1 commit into
mainfrom
ci/envtest-version-once

Conversation

@vvoytovych

@vvoytovych vvoytovych commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

ci.yaml and the Makefile each set envtest's versions, and they have drifted: CI installs setup-envtest at a release-0.25 commit, and the Makefile from release-0.19 (ecv's follow-up on #849). CI now runs make test-suite, a new target that make test also calls after it generates the code. Both versions now come from go.mod, as kubebuilder's scaffold derives them: setup-envtest at controller-runtime's version, v0.25.2, and the API server at k8s.io/api's minor, 1.37 in place of 1.31. A dependency bump now moves them with it, so they cannot drift again.

Changes

change file
CI runs make test-suite in place of its own setup-envtest install and go test line .github/workflows/ci.yaml
make test generates the code, then runs test-suite. ENVTEST_VERSION and ENVTEST_K8S_VERSION are read from go.mod with kubebuilder's gomodver Makefile

The suite now runs against the Kubernetes version that NSO's libraries are built for, so it sees that API server's validation and defaults. make test no longer writes cover.out: nothing in the repository reads it, and CI never wrote one.

Test plan

  • make test-suite passes locally against a 1.37.0 API server, with setup-envtest v0.25.2 installed from its release tag; the controller package took 150 s. The two packages that came from Go's test cache, test/crd and internal/webhook, pass again with -count=1.
  • make -n test runs the generation, then the same go test. actionlint passes, and nothing else in the repository names an envtest version.
  • ci / Build and test passes through make test-suite, on a 1.37.0 API server with setup-envtest v0.25.2, in 7 min 10 s. The controller package took 174 s, and the run includes the tests merged since, fix: prevent unrelated cells from overwriting internal DNS readiness #806's and fix controllers during deletion and update races #858's.

CI and `make test` each set envtest's versions, and they drifted: the
Makefile installed setup-envtest from release-0.19 and Kubernetes 1.31.0,
CI a release-0.25 commit and 1.31.0. CI now runs `make test-suite`, which
`make test` also calls after it generates the code. Both versions come
from go.mod, as kubebuilder's scaffold derives them: setup-envtest at
controller-runtime's version, and the API server at k8s.io/api's minor,
1.37 today. A dependency bump moves them, so they cannot drift again.
`make test` no longer writes cover.out, which nothing reads.

Follow-up to ecv's review of #849.
@vvoytovych vvoytovych self-assigned this Nov 4, 2026
@vvoytovych
vvoytovych marked this pull request as ready for review November 4, 2026 16:31
@vvoytovych
vvoytovych requested a review from a team as a code owner November 4, 2026 16:31
@vvoytovych
vvoytovych requested a review from ecv November 4, 2026 16:31
@vvoytovych
vvoytovych merged commit 8a662f8 into main Nov 5, 2026
10 checks passed
@vvoytovych
vvoytovych deleted the ci/envtest-version-once branch November 5, 2026 10:02
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