Repository navigation
🔥 feat(api)!: stop serving v1alpha1 — single-version CRDs, remove conversion webhook (8e-8a) - #175
Merged
Merged
Conversation
…(8e-8a) - narrow controller-gen CRD/webhook codegen to ./api/v1beta1 + ./internal/webhook/v1beta1 (Taskfile manifests + hack/verify.sh) so CRDs are single-version v1beta1 and the v1alpha1 validating-webhook entries drop out; deepcopy still spans ./api/... so the kept-but-unwired v1alpha1 Go types stay generated (8e-8b deletes them) - regenerate config/crd/bases + charts/mkurator/crds: single-version, no conversion stanza - remove conversion kustomize wiring: webhook_in_*/cainjection_in_* patches, kustomizeconfig.yaml, config/default CR-target CA-injection replacement block - cmd/main.go: drop messagingv1alpha1 scheme + conversion/v1alpha1 webhook SetupWithManager - hack/helm-verify-crds.sh: assert single-version, no conversion; helm-verify-admission.sh: 6 v1beta1 paths - delete v1alpha1 QMC sample (AUTH-15 twin); refresh docs/crds prose - v1alpha1 Go types + webhook/conversion packages KEPT on disk (unwired) for 8e-8b
…a1 (8e-8a) - delete test/conversionwebhook/ and test/e2e/conversion_e2e_test.go + unused helpers (setQueueStorageVersion/queueStored*/queueServed*/eventuallyExpectQueueSynced, upgradeMKuratorCRDs, expectCRDConversionWebhook) - flip all e2e CR manifests to messaging.mkurator.dev/v1beta1; delete the AUTH-15 'pre-union spoke' e2e (premise gone with the removed spoke version) - re-point test/admission/webhook_envtest_test.go + test/samples/samples_test.go + test/e2e/events_helpers.go to v1beta1; consolidate duplicate QMC helper - delete internal/webhook/v1alpha1 envtest suite (cel_validation_test.go + suite_test.go) that created v1alpha1 objects against single-version CRDs; KEEP the pure-unit webhook_unit_test.go/setup_test.go (fake client) and all non-test source for 8e-8b - refresh test/schema/README + e2e diagnostic dumps - grep -rn v1alpha1 test/ is now empty
…8e-8a) - assert status.storedVersions == [v1beta1] for all six kinds; FAIL LOUD if any CRD still lists the legacy spoke version (converts the bricked-upgrade P0 into a red gate) - create+read-back a v1beta1 QMC post-install to prove the single-version CRD accepts writes with no dangling conversion webhook (roast P1); runs in kustomize + helm smoke - legacy token assembled via concatenation so 'grep -rn v1alpha1 test/' stays empty
- CHANGELOG Removed entry (drives the minor bump): v1alpha1 unserved, CRDs single-version, conversion webhook gone; upgrade from <=v0.12 needs the stored-object rewrite+prune first - docs/UPGRADE.md: new 'Removing v1alpha1' section with pre-flight storedVersions check and the bricked-upgrade warning
…ean) An earlier verify run using the pre-narrowing controller-gen paths had clobbered config/crd/bases back to dual-version; regenerate cleanly so bases + helm CRDs + docs/crds are single-version v1beta1 with no conversion. task verify is green.
Scope surprise: 11 internal/controller/*_test.go envtest suites created/listed v1alpha1 objects through the API server, which no longer serves v1alpha1 once the CRDs are single-version (66/67 controller specs failed at the shared cleanup). - flip only the envtest (k8sClient) call-sites to v1beta1 (fixtures deleteAllOf, suite scheme, reconciler suites); fix v1beta1 pointer shape for CredentialsSecretRef - LEAVE the 9 fake-client unit suites on v1alpha1 — the fake client uses the runtime scheme (v1alpha1 still registered), so they pass unchanged AND keep coverage on the kept v1alpha1 source branches (reconcile_shared/suspend/adoption/etc.) for 8e-8b - queuemanagerconnection_native_v1beta1_test.go keeps its v1alpha1 TYPE/constant refs (write-recorder assertion + cross-version finalizer equality) — kept types, no served-version dependency; it already created v1beta1 objects Floors hold: internal 91.8% (>=90), api 76.6% (>=75).
…e (8e-8a) The chart's ValidatingWebhookConfiguration template hard-coded all 12 webhooks (6 v1alpha1 + 6 v1beta1); the v1alpha1 handlers are no longer wired and v1alpha1 is unserved, so a rendered v1alpha1 webhook would fail admission. Keep only the 6 v1beta1 webhooks; helm-verify-admission now asserts 6. Refresh webhook-service comment.
konih
marked this pull request as ready for review
July 30, 2026 15:02
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The shared setupMQObjectController Watches(&v1alpha1.QueueManagerConnection{})
plus the requestsForConnection fan-out + connectionReady/predicates/mapper were
still v1alpha1. Once 8e-8a drops v1alpha1 from the manager scheme, that source.Kind
watch can't register ('no kind is registered for v1alpha1.QueueManagerConnection'),
so the connection-ready trigger never fires and every workload reconcile times out.
Flip the whole connection-watch block + its unit tests to v1beta1.
|
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.



8e-8a — stop serving v1alpha1 (single-version CRDs, remove conversion webhook)
🔴 PUBLIC-CRD, breaking. Stops the six
messaging.mkurator.devCRDs servingv1alpha1: they are now single-version (v1beta1served + stored) and the conversion webhook wiring is gone. The v1alpha1 Go types +internal/webhook/v1alpha1+internal/webhook/conversionpackages stay on disk (unwired) for the 8e-8b follow-up.What changed
./api/v1beta1/...+./internal/webhook/v1beta1/...in bothTaskfile.yml(manifests) andhack/verify.sh(its own controller-gen call) — deepcopy still spans./api/.... Regeneratedconfig/crd/bases+charts/mkurator/crds+docs/crds: single-version, noconversion:stanza.messagingv1alpha1.AddToScheme,webhookconversion.SetupWithManager,webhookv1alpha1.SetupWithManager(packages kept, just unwired).config/crd/patches/{webhook,cainjection}_in_*.yaml,config/crd/kustomizeconfig.yaml, and the CRD-target CA-injection replacement block inconfig/default/kustomization.yaml. The v1beta1 validating-webhook wiring is untouched.charts/mkurator/crds/*single-version, no conversion; dropped the 6 v1alpha1 blocks from the chart'sValidatingWebhookConfigurationtemplate; rewrotehack/helm-verify-crds.sh(assert single-version + no conversion) andhack/helm-verify-admission.sh(6 v1beta1 paths).test/conversionwebhook/,test/e2e/conversion_e2e_test.go+ unused helpers, theinternal/webhook/v1alpha1envtest suite (cel_validation_test.go+suite_test.go); re-pointedtest/admission,test/samples, e2e YAMLs to v1beta1; deleted the AUTH-15 "pre-union spoke" e2e (premise gone).grep -rn v1alpha1 test/is empty.status.storedVersions == ["v1beta1"]for all six kinds and fails loud if any still lists the legacy spoke — converts the bricked-upgrade P0 into a red gate. Plus a post-install CR write+read smoke (proves the single-version CRD accepts writes with no dangling conversion; runs in kustomize + helm smoke).docs/UPGRADE.md"Removing v1alpha1" section (pre-flight storedVersions check + bricked-upgrade warning).internal/controller/*_test.gohad to be repointed too (NOT in the task's file list). 11 envtest suites created/listed v1alpha1 objects through the API server (66/67 controller specs failed once CRDs went single-version). Fixed surgically: flipped only the envtest (k8sClient) call-sites to v1beta1; left the 9 fake-client unit suites on v1alpha1 (fake client uses the runtime scheme — v1alpha1 still registered — so they pass unchanged AND keep coverage on the kept v1alpha1 source branches for 8e-8b).queuemanagerconnection_native_v1beta1_test.gokeeps its v1alpha1 type/constant refs (write-recorder + finalizer-equality; kept types, no served-version dependency).test/e2e) and theinternal/webhook/v1alpha1CEL envtest tested behavior that ceases to exist once v1alpha1 is unserved. Consistent with the operator's 8e hard-cut decision (supersedes fix(api): preserve authentication union across v1alpha1 spoke round trip (AUTH-14) #168), but naming it explicitly.Gates (local)
task verify✅ (codegen-clean, single-version) ·task format:check✅ ·task scrub✅task test:run✅ — internal 91.8% (≥90 floor) · api 76.6% (≥75 floor)task helm:lint✅ ·task helm:test✅ (22)go build ./...,go vet(default/e2e/integration tags) ✅task lint— clean for this worktree (the reported issues are all in a sibling agent's parallel worktree../agent-a29c…; CI builds a clean checkout)e2e (kustomize)+e2e (helm).Do not merge / self-approve — awaiting independent review + green CI.