Add an application setting for configuring package metadata synchronization
Problem to solve
The package metadata sync service is configured with several hard-coded defaults that dictate its behaviour. Specifically, it decides on its data source based on the presence of a file on the instance. Flexibility would be useful for users administering their GitLab instance.
Further details
Several settings would make package metadata synchronization easier to use:
- set the storage type (gcp vs file-based)
- set the gcp bucket name
- turn the feature off and on
Implementation Plan
- add migration to add columns to
application_settings
-
whether sync is on: pm_sync_enabled
(default:true
) -
storage type: pm_storage_type
(default:gcp
) -
gcp bucket name pm_gcp_bucket
(default:gcp_bucket
) - add validations to https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/application_setting.rb
-
-
add above to application_settings_helper
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/helpers/ee/application_settings_helper.rb - update views
-
add ee view (e.g. _package_metadata.html.haml) to https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/app/views/admin/application_settings -
link new view in https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/admin/application_settings/general.html.haml
-
Testing
Unit and integration tests to support functionality. SET will investigate whether a test project test or E2E spec is needed.
Edited by Will Meek