diff --git a/.rubocop_todo/gitlab/bounded_contexts.yml b/.rubocop_todo/gitlab/bounded_contexts.yml index e1da7df79e3c4deff3808f2034bb1ebd20ca8b77..608c173295b6560ca0cf7ee772dac0bd2c41aab0 100644 --- a/.rubocop_todo/gitlab/bounded_contexts.yml +++ b/.rubocop_todo/gitlab/bounded_contexts.yml @@ -3760,7 +3760,6 @@ Gitlab/BoundedContexts: - 'ee/app/workers/requirements_management/process_requirements_reports_worker.rb' - 'ee/app/workers/scan_security_report_secrets_worker.rb' - 'ee/app/workers/set_user_status_based_on_user_cap_setting_worker.rb' - - 'ee/app/workers/store_security_reports_worker.rb' - 'ee/app/workers/sync_seat_link_request_worker.rb' - 'ee/app/workers/sync_seat_link_worker.rb' - 'ee/app/workers/system_access/base_global_group_sync_worker.rb' diff --git a/.rubocop_todo/gitlab/namespaced_class.yml b/.rubocop_todo/gitlab/namespaced_class.yml index ba31df53077a7076ac63ad1eb9a8736a2ad698cc..b7bd566fda4b184f9b8ff4075c6a0f4d874e604f 100644 --- a/.rubocop_todo/gitlab/namespaced_class.yml +++ b/.rubocop_todo/gitlab/namespaced_class.yml @@ -1035,7 +1035,6 @@ Gitlab/NamespacedClass: - 'ee/app/workers/repository_update_mirror_worker.rb' - 'ee/app/workers/scan_security_report_secrets_worker.rb' - 'ee/app/workers/set_user_status_based_on_user_cap_setting_worker.rb' - - 'ee/app/workers/store_security_reports_worker.rb' - 'ee/app/workers/sync_seat_link_request_worker.rb' - 'ee/app/workers/sync_seat_link_worker.rb' - 'ee/app/workers/update_all_mirrors_worker.rb' diff --git a/.rubocop_todo/sidekiq_load_balancing/worker_data_consistency.yml b/.rubocop_todo/sidekiq_load_balancing/worker_data_consistency.yml index 64bf9b26049be8b941e016d0ae0a92751ce10bd6..e6eae60800c6f6e434fd6546e67119dd8b7c5809 100644 --- a/.rubocop_todo/sidekiq_load_balancing/worker_data_consistency.yml +++ b/.rubocop_todo/sidekiq_load_balancing/worker_data_consistency.yml @@ -398,7 +398,6 @@ SidekiqLoadBalancing/WorkerDataConsistency: - 'ee/app/workers/security/track_secure_scans_worker.rb' - 'ee/app/workers/set_user_status_based_on_user_cap_setting_worker.rb' - 'ee/app/workers/status_page/publish_worker.rb' - - 'ee/app/workers/store_security_reports_worker.rb' - 'ee/app/workers/sync_seat_link_request_worker.rb' - 'ee/app/workers/sync_seat_link_worker.rb' - 'ee/app/workers/todos_destroyer/confidential_epic_worker.rb' diff --git a/.rubocop_todo/style/inline_disable_annotation.yml b/.rubocop_todo/style/inline_disable_annotation.yml index 5e59c8c29a359fb578cc54013b1d1146727bf407..4b50d7600e77ffa3eb95206471bf93f97f456b3d 100644 --- a/.rubocop_todo/style/inline_disable_annotation.yml +++ b/.rubocop_todo/style/inline_disable_annotation.yml @@ -1593,7 +1593,6 @@ Style/InlineDisableAnnotation: - 'ee/app/workers/security/store_scans_worker.rb' - 'ee/app/workers/security/track_secure_scans_worker.rb' - 'ee/app/workers/set_user_status_based_on_user_cap_setting_worker.rb' - - 'ee/app/workers/store_security_reports_worker.rb' - 'ee/app/workers/sync_seat_link_worker.rb' - 'ee/app/workers/system_access/base_global_group_sync_worker.rb' - 'ee/app/workers/system_access/base_saas_group_sync_worker.rb' diff --git a/db/migrate/20240622200115_remove_store_security_reports_worker_job_instances.rb b/db/migrate/20240622200115_remove_store_security_reports_worker_job_instances.rb new file mode 100644 index 0000000000000000000000000000000000000000..a8dfbe27cb5ad267f7823b0a6a8e0a3ce2db16cf --- /dev/null +++ b/db/migrate/20240622200115_remove_store_security_reports_worker_job_instances.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class RemoveStoreSecurityReportsWorkerJobInstances < Gitlab::Database::Migration[2.2] + DEPRECATED_JOB_CLASSES = %w[ + StoreSecurityReportsWorker + ] + + disable_ddl_transaction! + + milestone '17.3' + + def up + sidekiq_remove_jobs(job_klasses: DEPRECATED_JOB_CLASSES) + end + + def down + # This migration removes any instances of deprecated workers and cannot be undone. + end +end diff --git a/db/schema_migrations/20240622200115 b/db/schema_migrations/20240622200115 new file mode 100644 index 0000000000000000000000000000000000000000..c820a5d959a86a8bd7905333bdc8e5e5afc7eb37 --- /dev/null +++ b/db/schema_migrations/20240622200115 @@ -0,0 +1 @@ +babe4bfda1c5870fc7c1d09d45b24a250538c982da450ee8c67a36a0f4116f9d \ No newline at end of file diff --git a/ee/app/workers/all_queues.yml b/ee/app/workers/all_queues.yml index 652ca9586c633829c4c4f4912c18f99a11607714..d1edca61475bab6edb02e4be338c729d2d04d43e 100644 --- a/ee/app/workers/all_queues.yml +++ b/ee/app/workers/all_queues.yml @@ -948,15 +948,6 @@ :weight: 2 :idempotent: false :tags: [] -- :name: security_scans:store_security_reports - :worker_name: StoreSecurityReportsWorker - :feature_category: :vulnerability_management - :has_external_dependencies: false - :urgency: :low - :resource_boundary: :cpu - :weight: 2 - :idempotent: false - :tags: [] - :name: todos_destroyer:todos_destroyer_confidential_epic :worker_name: TodosDestroyer::ConfidentialEpicWorker :feature_category: :portfolio_management diff --git a/ee/app/workers/store_security_reports_worker.rb b/ee/app/workers/store_security_reports_worker.rb deleted file mode 100644 index ae8fbe1025cbb13d8598ad9e1f1b66b728f878e9..0000000000000000000000000000000000000000 --- a/ee/app/workers/store_security_reports_worker.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Worker for storing security reports into the database. -# -# DEPRECATED: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151541 -class StoreSecurityReportsWorker # rubocop:disable Scalability/IdempotentWorker - include ApplicationWorker - include SecurityScansQueue - include Gitlab::ExclusiveLeaseHelpers - - LEASE_TTL = 30.minutes.freeze - - data_consistency :always - sidekiq_options retry: 3 - feature_category :vulnerability_management - worker_resource_boundary :cpu - - # TODO: remove in https://gitlab.com/gitlab-org/gitlab/-/issues/467944 - def perform(pipeline_id); end - - private - - def lease_key(project) - "StoreSecurityReportsWorker:projects:#{project.id}" - end -end diff --git a/spec/workers/every_sidekiq_worker_spec.rb b/spec/workers/every_sidekiq_worker_spec.rb index d780e18759a83dcee293b4440db6058e5b27d424..1fcdf1441e1078621dc7579178043c4b94a84391 100644 --- a/spec/workers/every_sidekiq_worker_spec.rb +++ b/spec/workers/every_sidekiq_worker_spec.rb @@ -447,7 +447,6 @@ 'Snippets::UpdateRepositoryStorageWorker' => 3, 'StageUpdateWorker' => 3, 'StatusPage::PublishWorker' => 5, - 'StoreSecurityReportsWorker' => 3, 'Security::StoreSecurityReportsByProjectWorker' => 3, 'SyncSeatLinkRequestWorker' => 20, 'SyncSeatLinkWorker' => 12,