fix: sync child resources by owner UID - #2
Merged
Conversation
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 changed
Why
client-go LIST objects may omit per-item
kindandapiVersion. The synchronizer compared those empty fields with owner references, so a running exporter Pod could be omitted fromMiddleware.status.customResources.include.podseven though its Deployment and Service were present.Impact
The status schema, sorting, CRDs, baselines, and label compatibility path are unchanged. Correct UID ownership now works even without TypeMeta; stale same-name resources with a different UID are no longer treated as current children.
Validation
go test ./internal/service/synchronizer -run "TestHasOwnerUID|TestOwnerReferencesMatch|TestCollectOwnedPods|TestPVCBelongsToStatefulSet" -count=1go test ./internal/service/synchronizer ./internal/service/watcher -race -count=1go test ./... -count=1go vet ./...git diff --checkRemaining gate
Runtime verification in the 52 environment will be performed separately by the maintainer.