Skip to content

Clean up cache collections#54499

Merged
rosstimothy merged 1 commit intomasterfrom
tross/cache_collections_cleanup
May 13, 2025
Merged

Clean up cache collections#54499
rosstimothy merged 1 commit intomasterfrom
tross/cache_collections_cleanup

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy commented May 3, 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 only 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.

@rosstimothy rosstimothy added the no-changelog Indicates that a PR does not require a changelog entry label May 3, 2025
@rosstimothy rosstimothy force-pushed the tross/cache_collections_cleanup branch 8 times, most recently from 3b9468c to 2489fb7 Compare May 12, 2025 16:42
@rosstimothy rosstimothy marked this pull request as ready for review May 12, 2025 17:01
@github-actions github-actions Bot requested a review from atburke May 12, 2025 17:01
Comment thread lib/cache/access_list.go Outdated
Comment thread api/types/kubernetes.go Outdated
@rosstimothy rosstimothy force-pushed the tross/cache_collections_cleanup branch from 2489fb7 to ad10b46 Compare May 13, 2025 12:37
@rosstimothy rosstimothy requested a review from espadolini May 13, 2025 12:38
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from atburke May 13, 2025 15:41
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.
@rosstimothy rosstimothy force-pushed the tross/cache_collections_cleanup branch from ad10b46 to 09540f3 Compare May 13, 2025 16:16
@rosstimothy rosstimothy enabled auto-merge May 13, 2025 16:17
@rosstimothy rosstimothy added this pull request to the merge queue May 13, 2025
Merged via the queue into master with commit bde53bc May 13, 2025
41 checks passed
@rosstimothy rosstimothy deleted the tross/cache_collections_cleanup branch May 13, 2025 16:58
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@rosstimothy See the table below for backport results.

Branch Result
branch/v18 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants