Skip to content

Convert access requests to new cache mechanism#54580

Closed
rosstimothy wants to merge 1 commit intomasterfrom
tross/access_requests
Closed

Convert access requests to new cache mechanism#54580
rosstimothy wants to merge 1 commit intomasterfrom
tross/access_requests

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Moves access requests to the new cache collection scheme that was introduced in #52210. No additional functionality changes have been made here. This should be a purely mechanical translation to the new internal caching machinery.

@rosstimothy rosstimothy added the no-changelog Indicates that a PR does not require a changelog entry label May 6, 2025
@rosstimothy rosstimothy marked this pull request as ready for review May 6, 2025 22:40
@github-actions github-actions Bot requested review from espadolini and kopiczko May 6, 2025 22:40
@rosstimothy rosstimothy force-pushed the tross/access_requests branch from 38f08b9 to b1351b8 Compare May 7, 2025 12:27
@rosstimothy rosstimothy requested a review from fspmarshall May 7, 2025 12:28
@rosstimothy rosstimothy force-pushed the tross/access_requests branch from b1351b8 to 0ce4550 Compare May 7, 2025 19:23
Moves access requests to the new cache collection scheme that was
introduced in #52210. No additional functionality changes have
been made here. This should be a purely mechanical translation to
the new internal caching machinery.
@rosstimothy rosstimothy force-pushed the tross/access_requests branch from 0ce4550 to 554caaa Compare May 7, 2025 19:34
Comment on lines +34 to +39
store: newStore(map[string]func(types.AccessRequest) string{
"default": func(types.AccessRequest) string { return "default" },
}),
fetcher: func(ctx context.Context, loadSecrets bool) ([]types.AccessRequest, error) {
return nil, nil
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm very out of my depth here, but this is somewhat suspicious.

From what I've seen for the store index we usually have something like:

		store: newStore(map[proxyServerIndex]func(types.Server) string{
			proxyServerNameIndex: func(u types.Server) string {
				return u.GetName()
			},
		}),

Isn't that needed here?

Also why is the fetcher returning nil?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Access requests in the cache are weird because the auth doesn't actually cache them but they must be usable in watchers; we should make it more explicit that this is what's happening, or find a better way to deal with resource kinds that are watchable and fanned out but not actually handled by the cache.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comment could be useful

@rosstimothy
Copy link
Copy Markdown
Contributor Author

Closing in favor of #54637

@rosstimothy rosstimothy closed this May 8, 2025
@rosstimothy rosstimothy deleted the tross/access_requests branch May 20, 2025 11:52
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