Generalize AgentAuthorizationsFinder for supporting various access keywords
What does this MR do and why?
This MR is preliminary work for Persist user_access Agent Authorizations (!116363 - closed), which resolves Persist GitLab agent's user access configuratio... (#389430 - closed) and Show shared agents in deployment projects (#395498 - closed) eventually. It introduces the following changes:
- Currently,
config
column ofagent_project/group_authorizations
tables persists parameters ofci_access
keyword e.g.enviornments
. We'd like to persistuser_access
as well, to do so, this MR explicitly puts the parameters underci_access
keyword for avoiding conflicts. This is done inapp/services/clusters/agents/refresh_authorization_service.rb
- Since we change the structure of
config
column, we need to make sure that it doesn't break the existing functionalities that rely on the legacy structure. This MR refactors the AgentAuthorizationsFinder to maintain parity and avoid breaking changes. - It generalizes
AgentAuthorizationsFinder
for flexible filtering and moves logic ofFilterAuthorizationsService
to the finder for gathering all of the filtering logic.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Shinya Maeda