Do not allow waiting project authorizations refreshes
What does this MR do and why?
First step for https://gitlab.com/gitlab-org/gitlab/-/issues/363163
With this MR, we are trying to move away from running waiting project authorizations refreshes inline, along with the request (ie, in Puma). All such jobs such be processed by Sidekiq from now on, without any waiting.
Previously:
- jobs with 1 to 3 arguments - processed inline, along with the request.
- jobs with 4 to 100 arguments - processed via Sidekiq, but it waits on the request for all jobs to finish, using
Gitlab::JobWaiter
- jobs with greater than 100 arguments - processed via Sidekiq and does not wait.
async_only_project_authorizations_refresh
feature flag):
After the change (behind - jobs with 1 to 3 arguments - processed inline, along with the request.
- jobs with 4 to 100 arguments - processed via Sidekiq, and does not wait.
- jobs with greater than 100 arguments - processed via Sidekiq and does not wait.
Benefit
When we use Gitlab::JobWaiter
, we lose the ability to deduplicate jobs. If we get rid of using Gitlab::JobWaiter
, we gain the ability to deduplicate these jobs. If more project authorization refresh jobs are deduplicated, we run fewer complex queries.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
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.