Repository navigation
fix(webhook): 🐛 dedup QMC delete-deny dependents listed under both api versions (CI-4) - #104
Merged
Merged
Conversation
…i versions (CI-4)
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.
What
Dedup the QueueManagerConnection delete-deny webhook message so each dependent is listed once.
listConnectionDependentslists dependents under both v1alpha1 and v1beta1. Because the conversion webhook serves a single stored object under both api versions, the same(kind, name)referent is returned by both Lists and appended twice — so the deny message printed e.g.Queue "e2e-orders-n1", Queue "e2e-orders-n1"(visible verbatim in nightly run29115407083).Fix: a
seenset +appendDependenthelper dedups by(kind, name), preserving first-seen order (v1alpha1 before v1beta1; existing kind order). Both delete paths (ValidateQueueManagerConnectionDeleteand...DeleteV1Beta1) share the helper, so both are covered. No change to referential-integrity behavior — message only.Relationship to #103
This is the dedup nit half of the CI-4 board item. The nightly 3-node e2e race itself is already fixed by merged #103 (serialize shared-state specs). Together they close CI-4:
Tests
Two unit tests in
queuemanagerconnection_test.go:...DedupsDualVersionDependents— a Queue served under both versions appears exactly once in the deny detail.TestListConnectionDependentsDedupAndOrder— a shared dual-version Queue is deduped while a distinct v1beta1-only Queue is preserved, in first-seen order.Verified the tests fail (printing the
Queue "x", Queue "x"symptom) when the dedup guard is neutered.Gates
task verify✅task lint✅ (golangci 0 issues, go-arch-lint OK)task test:run✅ 91.0% (at the ≥91% floor — coverage-neutral)