Clean up cache collections#54499
Merged
rosstimothy merged 1 commit intomasterfrom May 13, 2025
Merged
Conversation
3b9468c to
2489fb7
Compare
espadolini
reviewed
May 13, 2025
2489fb7 to
ad10b46
Compare
espadolini
approved these changes
May 13, 2025
fspmarshall
approved these changes
May 13, 2025
The store now takes a clone function and uses it to clone all resources within calls to put. This ensures that there are no races caused by any modifications of the resource by the event stream. This also allowed the clone function to be removed from the genericGetter and genericLister as they can now leverage the store clone function. All header transforms now populate the kind and version based on the information in the ResourceHeader instead of hardcoding the currently known values. All indexes derived from the resource name are specified using `Resource.GetName` instead of defining a function in line that called r.GetName(). The one caveat being this only works for types that are behind an interface and none of the RFD 153 style resources. The clone function of all non-gogo proto resources were switched from utils.CloneProtoMsg to proto.CloneOf. The clone utility is only required to prevent panics when cloning gogo proto resources. All remaining local resource caches have been removed. All unused legacy executors have been removed.
ad10b46 to
09540f3
Compare
Contributor
|
@rosstimothy See the table below for backport results.
|
This was referenced May 15, 2025
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.
The store now takes a clone function and uses it to clone all resources within calls to put. This ensures that there are no races caused by any modifications of the resource by the event stream. This also allowed the clone function to be removed from the genericGetter and genericLister as they can now leverage the store clone function.
All header transforms now populate the kind and version based on the information in the ResourceHeader instead of hardcoding the currently known values.
All indexes derived from the only the resource name are specified using
Resource.GetNameinstead of defining a function in line that called r.GetName(). The one caveat being this only works for types that are behind an interface and none of the RFD 153 style resources.The clone function of all non-gogo proto resources were switched from utils.CloneProtoMsg to proto.CloneOf. The clone utility is only required to prevent panics when cloning gogo proto resources.
All remaining local resource caches have been removed.
All unused legacy executors have been removed.