Repository navigation
ci: Run the test suite through one Makefile target - #863
Merged
Merged
Conversation
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.
scotwells
approved these changes
Nov 4, 2026
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ci.yamland the Makefile each set envtest's versions, and they have drifted: CI installs setup-envtest at arelease-0.25commit, and the Makefile fromrelease-0.19(ecv's follow-up on #849). CI now runsmake test-suite, a new target thatmake testalso calls after it generates the code. Both versions now come fromgo.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
make test-suitein place of its own setup-envtest install andgo testline.github/workflows/ci.yamlmake testgenerates the code, then runstest-suite.ENVTEST_VERSIONandENVTEST_K8S_VERSIONare read fromgo.modwith kubebuilder'sgomodverMakefileThe 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 testno longer writescover.out: nothing in the repository reads it, and CI never wrote one.Test plan
make test-suitepasses 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/crdandinternal/webhook, pass again with-count=1.make -n testruns the generation, then the samego test.actionlintpasses, and nothing else in the repository names an envtest version.ci / Build and testpasses throughmake 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.