Skip to content

Do not run refresh_member_authorized_projects callback when importing

What does this MR do?

This MR:

  • Disables callback refresh_member_authorized_projects when importing a group or project due to the fact that it can cause import to take significantly longer. Refresh of authorizations is not needed to be done during the import for each individual member
  • Enqueue async AuthorizedProjectUpdate::ProjectRecalculateWorker instead at the end when import is finished in the after import hook. This ensures authorizations are updated still updated, but it's done in scope of 1 sidekiq job
  • Callback is also disabled for Group Import, since during group import there are no projects in the groups, so there is no point in executing this callback

More details in #334627 (closed)

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by George Koltsov

Merge request reports

Loading