diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 8f8ae48293a683ac9e4e891c4ea0d2e01e52cdfa..89f8867fe62112ff06baf33b8637f878d4b58986 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -2303,7 +2303,7 @@ :feature_category: :importers :has_external_dependencies: true :urgency: :low - :resource_boundary: :unknown + :resource_boundary: :memory :weight: 1 :idempotent: false :tags: [] @@ -2312,7 +2312,7 @@ :feature_category: :importers :has_external_dependencies: false :urgency: :low - :resource_boundary: :unknown + :resource_boundary: :memory :weight: 1 :idempotent: true :tags: [] @@ -3365,7 +3365,7 @@ :feature_category: :importers :has_external_dependencies: true :urgency: :low - :resource_boundary: :unknown + :resource_boundary: :memory :weight: 1 :idempotent: false :tags: [] diff --git a/app/workers/bulk_imports/pipeline_worker.rb b/app/workers/bulk_imports/pipeline_worker.rb index 8f03c74e13e7616fc6022a6cceb443631f2da63b..f03e0bc06564545b316207a57c0ffbe2ec0e8e64 100644 --- a/app/workers/bulk_imports/pipeline_worker.rb +++ b/app/workers/bulk_imports/pipeline_worker.rb @@ -12,6 +12,7 @@ class PipelineWorker # rubocop:disable Scalability/IdempotentWorker sidekiq_options retry: false, dead: false worker_has_external_dependencies! deduplicate :until_executing + worker_resource_boundary :memory def perform(pipeline_tracker_id, stage, entity_id) @entity = ::BulkImports::Entity.find(entity_id) diff --git a/app/workers/bulk_imports/relation_export_worker.rb b/app/workers/bulk_imports/relation_export_worker.rb index dcac841b3b2f5820b502699273dca20504bc2b80..9d1ed30caf682bc00a6d6567e51291917409a8a6 100644 --- a/app/workers/bulk_imports/relation_export_worker.rb +++ b/app/workers/bulk_imports/relation_export_worker.rb @@ -11,6 +11,7 @@ class RelationExportWorker data_consistency :always feature_category :importers sidekiq_options status_expiration: StuckExportJobsWorker::EXPORT_JOBS_EXPIRATION + worker_resource_boundary :memory def perform(user_id, portable_id, portable_class, relation) user = User.find(user_id) diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb index f9e12c5135aaf4321f3f30f986ebc103f36c0eeb..641b22918961279367fb397da37d594b234a52f4 100644 --- a/app/workers/repository_import_worker.rb +++ b/app/workers/repository_import_worker.rb @@ -12,6 +12,7 @@ class RepositoryImportWorker # rubocop:disable Scalability/IdempotentWorker # Do not retry on Import/Export until https://gitlab.com/gitlab-org/gitlab/-/issues/16812 is solved. sidekiq_options retry: false, dead: false sidekiq_options status_expiration: Gitlab::Import::StuckImportJob::IMPORT_JOBS_EXPIRATION + worker_resource_boundary :memory # technical debt: https://gitlab.com/gitlab-org/gitlab/issues/33991 sidekiq_options memory_killer_memory_growth_kb: ENV.fetch('MEMORY_KILLER_REPOSITORY_IMPORT_WORKER_MEMORY_GROWTH_KB', 50).to_i diff --git a/spec/commands/sidekiq_cluster/cli_spec.rb b/spec/commands/sidekiq_cluster/cli_spec.rb index 428a0588bdd36663c00686d77aec6fe3ed65a04e..3951ef4928882df78a2954f273d9ca1c22acd4be 100644 --- a/spec/commands/sidekiq_cluster/cli_spec.rb +++ b/spec/commands/sidekiq_cluster/cli_spec.rb @@ -246,12 +246,12 @@ if Gitlab.ee? [ %w[cronjob:clusters_integrations_check_prometheus_health incident_management_close_incident status_page_publish], - %w[project_export projects_import_export_parallel_project_export projects_import_export_relation_export project_template_export] + %w[bulk_imports_pipeline bulk_imports_relation_export project_export projects_import_export_parallel_project_export projects_import_export_relation_export repository_import project_template_export] ] else [ %w[cronjob:clusters_integrations_check_prometheus_health incident_management_close_incident], - %w[project_export projects_import_export_parallel_project_export projects_import_export_relation_export] + %w[bulk_imports_pipeline bulk_imports_relation_export project_export projects_import_export_parallel_project_export projects_import_export_relation_export repository_import] ] end