Read the HolderAvailable contract from the networking API - #254
Open
scotwells wants to merge 2 commits into
Open
Read the HolderAvailable contract from the networking API#254scotwells wants to merge 2 commits into
scotwells wants to merge 2 commits into
Conversation
Compute declared the HolderAvailable condition type as a local string literal, so the two repos agreed only by both spelling it the same way. Nothing failed at build time if networking changed the spelling: compute would keep writing the old string and every NetworkService member would silently read as unhealthy. Importing the symbol makes that a compile error instead. The pin moves to the network-services-operator branch that defines the constants; no tagged release carries them yet. Key changes: - Drop the local condition-type constant for the networking symbol - Use the networking reason for an unavailable holder that names none - Keep HolderNotReported and HolderTerminating local; they are compute's own vocabulary with no networking counterpart
internal/controller registered zero specs, so the suite printed "Ran 0 of 0 Specs ... SUCCESS!" on every run and looked like envtest coverage where there was none. Its BeforeSuite never executed, which also hid that it pointed at config/crd/bases -- a directory that has not existed since the manifests moved under config/base. Nothing depended on it standing up: it was the repo's only Ginkgo and Gomega consumer, and the package's real envtest coverage boots its own environment in instance_setup_test.go, so KUBEBUILDER_ASSETS is still required. Key changes: - Remove internal/controller/suite_test.go and drop Ginkgo from go.mod - Give reconcileInstanceReadyCondition a real context; it was reading the suite's package-level ctx, which was nil because BeforeSuite never ran
scotwells
marked this pull request as ready for review
August 26, 2026 22:16
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.
Compute declared the
HolderAvailablecondition as its own string literal, matching network-services-operator by convention alone. A rename there would have kept compiling here, kept writing the old value, and left every NetworkService member reading as unhealthy with nothing failing at build.The pin now resolves the constant, so drift is a compile error.
HolderTerminatingandHolderNotReportedstay local, since they describe things only a holder can know.Also deletes the
internal/controllerGinkgo suite. It registered no specs and reported SUCCESS having run nothing, while pointing at a CRD directory that does not exist. Removing it surfaced a table test running against a nil context, fixed here.Follows #253, which added the condition under the literal this replaces.
Pairs with datum-cloud/network-services-operator#411, which defines the constant and reads the condition for NetworkService member health.
Design: datum-cloud/enhancements#870.