Add access lists, members, and reviews to cache.#36020
Merged
Conversation
15a3ec5 to
217c0f4
Compare
fspmarshall
approved these changes
Jan 3, 2024
Contributor
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
espadolini
approved these changes
Jan 3, 2024
Contributor
espadolini
left a comment
There was a problem hiding this comment.
I like the approach of the "simple" version of the access list service; I'd consider moving it under lib/services/simple rather than having it in lib/cache/simple tho.
added 3 commits
January 5, 2024 08:58
Access lists, members, and reviews have been added to the cache. To do this, I have created a simple backend that doesn't perform the validation that is performed by the main access list backend and only implements a subset of actions that are needed by the cache. To support this, I've added in new gRPC methods: ListAllAccessListMembers and ListAllAccessListReviews. These do not lock any access lists and additionally do not perform any implicit or dynamic members, but just simply return the full list of all members and reviews so that these endpoints can be used to populate the cache. The general thought here that, since the order of cache events cannot be guaranteed, we'll rely on the auth server to perform the proper backend validation and use a simplified backend that simply sees if the items are present in the cache. If so, we'll return them. I've had to update a few protos to support this. While I was here, I fixed a bug in the access list gRPC client where the call tolist of reviews was not supplying the access list name. Additionally, the user login state generator will now use the cached access list values.
956f445 to
fad08f6
Compare
This was referenced Jan 5, 2024
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.
Access lists, members, and reviews have been added to the cache. To do this, I have created a simple backend that doesn't perform the validation that is performed by the main access list backend and only implements a subset of actions that are needed by the cache.
To support this, I've added in new gRPC methods:
ListAllAccessListMembers and ListAllAccessListReviews. These do not lock any access lists and additionally do not perform any implicit or dynamic members, but just simply return the full list of all members and reviews so that these endpoints can be used to populate the cache.
The general thought here that, since the order of cache events cannot be guaranteed, we'll rely on the auth server to perform the proper backend validation and use a simplified backend that simply sees if the items are present in the cache. If so, we'll return them.
I've had to update a few protos to support this. While I was here, I fixed a bug in the access list gRPC client where the call tolist of reviews was not supplying the access list name. Additionally, the user login state generator will now use the cached access list values.
changelog: Access lists and associated resources are now cached, which should significantly reduce the impact of access list calculation.