Skip to content

Read the HolderAvailable contract from the networking API - #254

Open
scotwells wants to merge 2 commits into
mainfrom
chore/holder-available-symbol
Open

Read the HolderAvailable contract from the networking API#254
scotwells wants to merge 2 commits into
mainfrom
chore/holder-available-symbol

Conversation

@scotwells

@scotwells scotwells commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Compute declared the HolderAvailable condition 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. HolderTerminating and HolderNotReported stay local, since they describe things only a holder can know.

Also deletes the internal/controller Ginkgo 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.

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
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.

1 participant