Skip to content

fix(webhook): 🐛 dedup QMC delete-deny dependents listed under both api versions (CI-4) - #104

Merged
konih merged 1 commit into
mainfrom
worktree-ci4-dedup
Jul 10, 2026
Merged

konih merged 1 commit into
mainfrom
worktree-ci4-dedup

Conversation

@konih

@konih konih commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What

Dedup the QueueManagerConnection delete-deny webhook message so each dependent is listed once.

listConnectionDependents lists 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 run 29115407083).

Fix: a seen set + appendDependent helper dedups by (kind, name), preserving first-seen order (v1alpha1 before v1beta1; existing kind order). Both delete paths (ValidateQueueManagerConnectionDelete and ...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)

@konih
konih merged commit 1b53957 into main Jul 10, 2026
14 checks passed
@konih
konih deleted the worktree-ci4-dedup branch July 10, 2026 20:59
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