-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Properties to a map #1655
Merged
Merged
Conversation
This file contains 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
theunrepentantgeek
requested review from
babbageclunk,
davefellows,
matthchr and
Porges
as code owners
July 20, 2021 20:23
theunrepentantgeek
force-pushed
the
feature/propertyset
branch
2 times, most recently
from
July 20, 2021 22:39
ba88b90
to
6a873c3
Compare
Codecov Report
@@ Coverage Diff @@
## master #1655 +/- ##
==========================================
+ Coverage 67.08% 67.65% +0.56%
==========================================
Files 205 211 +6
Lines 14840 15179 +339
==========================================
+ Hits 9956 10269 +313
- Misses 4126 4146 +20
- Partials 758 764 +6
Continue to review full report at Codecov.
|
theunrepentantgeek
force-pushed
the
feature/propertyset
branch
from
July 21, 2021 05:14
6a873c3
to
307399e
Compare
babbageclunk
approved these changes
Jul 21, 2021
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 this PR does / why we need it:
Changes the
Properties()
method exposed byObjectType
andResourceType
to return a (strongly typed) map instead of a slice.Most of the consumers of the method don't care about the ordering, but they're paying the price of sorting.
Introducing the type
PropertySet
allows for easy conversion to a slice for the few consumers that care (by callingAsSlice()
, while allowing random access for other consumers.Note that this changes the order of propeties returned from
ResourceType
- they're now alphabetical (Spec/Status) instead of hard coded (Status/Spec); this has resulted in minor changes to a few golden files.Special notes for your reviewer:
The
Properties()
method is called a lot of times (67 references) and I haven't exahustively reviewed all of them. Instead, I've relied on the compiler, linter, and our tests, to find cases where updates are needed.How does this PR make you feel:
If applicable: