Skip to content

Ci::JobToken::AuthorizationsCompactor

Darby Frey requested to merge authorizations-compactor into master

What does this MR do and why?

This MR adds a process to compact Ci::JobToken::Authorizations into the limits of the Ci::JobToken::Allowlist as part of #478540.

I've included comments in the code to explain what it is doing, but please let me know if there are questions or if I can add more details. This approach uses the traversal_ids to find the most common namespaces in the list of projects in the authorization log and consolidates those projects into one entry for the namespace. It repeats this process until the list is below the target size, or raises an error if the target size cannot be achieved.

@fabiopitino @dbiryukov @shampton would you mind giving this a look when you have some time and let me know if this makes sense, or if there are some optimizations I'm missing?

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Darby Frey

Merge request reports

Loading