Add admin controls to start the import of License DB
Why
GitLab is running in different environments: QA, local, self-hosted production versions. Those environments might have less resources that are available for GitLab.com. In this case the sync between GitLab database and License DB will be slower or risking exhaust resources. Read more in How do we keep the main DB responsive during th... (#397670 - closed)
Objective
This issue is dedicated to creating am admin setting that will allow fully or partially disable the sync process per GitLab instance. After this issue is implemented, the admin of the instance will need to enable the feature for sync to run. They will be able to choose which type of packages to sync. Read more about this proposal.
Implementation
-
Create a new tab in the EE admin panel "Security and Compliance" by adding to ee/app/controllers/admin
andee/app/views/admin
required folder and boilerplate controller and view. -
Hide controller behind action check_license
as this feature is available only in GitLab Ultimate. -
Link new view in https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/admin/application_settings/general.html.haml -
Create a new settings for sync purl_types, similar to what we have already in "Admin Area > General > Visibility and access controls > Import sources" -
Add check for the new settings from PackageMetadata::SyncConfiguration
https://gitlab.com/gitlab-org/gitlab/blob/03f6d482ab702c760639c04b59f0ea4b55c9e880/ee/app/models/package_metadata/sync_configuration.rb#L35-35 -
Add required tests -
Update documentation -
Enable sync on staging.gitlab.com -
Enable sync on gitlab.com
Testing
As per implementation plan, Add required tests is covered off. If needed the SET will introduce an E2E spec, but we really want to shift left and cover off as a lower level test.