This repository was archived by the owner on Sep 30, 2024. It is now read-only.
authz: Compute providers on the fly#64012
Merged
Merged
Conversation
Member
Author
56a265c to
70d5438
Compare
0f2223d to
88e14a5
Compare
This was referenced Jul 24, 2024
70d5438 to
235c970
Compare
88e14a5 to
e8fbddf
Compare
This was referenced Jul 24, 2024
235c970 to
20e7396
Compare
e8fbddf to
2f13f50
Compare
20e7396 to
89f2377
Compare
2f13f50 to
bb95aa9
Compare
pjlast
approved these changes
Jul 30, 2024
89f2377 to
e4136ae
Compare
bb95aa9 to
13b3a9c
Compare
This was referenced Jul 30, 2024
13b3a9c to
980aa69
Compare
Previously, we would store authz providers globally and refresh them every now and then. However, creating the providers is fairly cheap (1.3ms in a local trace) so we should not keep them in memory and remember to not forget to start the watcher routine. This will help for multi-tenant Sourcegraph in that providers are now computed for the context in question, and not held globally. Keeping potentially 100k authz providers in memory will not scale. Test plan: Still works, local Jaeger traces are quite acceptable.
980aa69 to
2e603ee
Compare
Member
Author
This was referenced Aug 4, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Previously, we would store authz providers globally and refresh them every now and then.
However, creating the providers is fairly cheap (1.3ms in a local trace) so we should not keep them in memory and remember to not forget to start the watcher routine.
This will help for multi-tenant Sourcegraph in that providers are now computed for the context in question, and not held globally. Keeping potentially 100k authz providers in memory will not scale.
Test plan: Still works, local Jaeger traces are quite acceptable.