[281#2] refactor(srb): migrate SRB controller to shared metadata package#288
Closed
mpechkurov wants to merge 1 commit into
Closed
[281#2] refactor(srb): migrate SRB controller to shared metadata package#288mpechkurov wants to merge 1 commit into
mpechkurov wants to merge 1 commit into
Conversation
Move the "nil managed resource" test case from a nested position inside the "nil pointer value overrides default label" test to a top-level t.Run sibling in TestBuildMetadata. Replace SRB controller's local isMetadataUpToDate and metadataMapEqual helpers with metadata.IsMetadataUpToDate and metadata.MetadataMapContains from the shared metadata package. This adopts correct merge-patch semantics (subset check via MetadataMapContains) instead of exact equality, and removes ~45 lines of duplicated logic. Update two SRB test expectations for subset semantics: - ExtraLabelInActual: false -> true (desired is subset of actual) - SpecWithoutMetadataBindingHasLabels: false -> true (empty desired is subset of anything) [281#2]
Collaborator
|
Closing as #281 received review comments. |
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
isMetadataUpToDate/metadataMapEqualfrom SRB controllermetadata.IsMetadataUpToDateandmetadata.MetadataMapContainsTest Changes
ExtraLabelInActual: false → true (desired is subset of actual)SpecWithoutMetadataBindingHasLabels: false → true (empty desired is subset of anything)Part of
Split from #281 — PR 2 of 6. Depends on [281#1].
Merge order: [281#1] → [281#2] → [281#3] → [281#4] → [281#5] → [281#6]