Add application setting for the registry repair worker max concurrency
What does this MR do and why?
This MR adds an application setting to set the max concurrency of ContainerRegistry::RecordDataRepairDetailWorker
added in !115156 (merged).
A new column is added in the application settings table and is then used in the worker. The worker is behind the feature flag registry_data_repair_worker
which will be cleaned out once it is tested and enabled in production. After the feature flag is cleaned out, we will have another MR to add this new application setting in the UI.
How to set up and validate locally
- Run the migration locally
- In the rails console, check that the application setting is accessible
::Gitlab::CurrentSettings.current_application_settings.container_registry_data_repair_detail_worker_max_concurrency
Migration Output
Up
main: == 20230516183736 AddContainerRegistryDataRepairWorkerMaxConcurrencyToApplicationSettings: migrating
main: -- add_column(:application_settings, :container_registry_data_repair_detail_worker_max_concurrency, :integer, {:default=>2, :null=>false})
main: -> 0.0050s
main: == 20230516183736 AddContainerRegistryDataRepairWorkerMaxConcurrencyToApplicationSettings: migrated (0.0118s)
Down
main: == 20230516183736 AddContainerRegistryDataRepairWorkerMaxConcurrencyToApplicationSettings: reverting
main: -- remove_column(:application_settings, :container_registry_data_repair_detail_worker_max_concurrency, :integer, {:default=>2, :null=>false})
main: -> 0.0100s
main: == 20230516183736 AddContainerRegistryDataRepairWorkerMaxConcurrencyToApplicationSettings: reverted (0.0153s)
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.
Related to #390842
Edited by Adie (she/her)