Commit 4ea44cb1 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'default-new-workers-to-25-retries' into 'master'

Set Sidekiq default retries back to 25 (only for new workers) [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!59907
parents 06dd3bcf cdf2df8a
......@@ -2,6 +2,8 @@
class AdminEmailWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -5,6 +5,8 @@ module Analytics
# This worker will be removed in 14.0
class CountJobTriggerWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :devops_reports
......
......@@ -6,6 +6,8 @@ module Analytics
class CounterJobWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :devops_reports
urgency :low
......
......@@ -5,6 +5,8 @@ module Analytics
class CountJobTriggerWorker
extend ::Gitlab::Utils::Override
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
DEFAULT_DELAY = 3.minutes.freeze
......
......@@ -6,6 +6,8 @@ module Analytics
extend ::Gitlab::Utils::Override
include ApplicationWorker
sidekiq_options retry: 3
feature_category :devops_reports
urgency :low
......
......@@ -3,6 +3,8 @@
class ApproveBlockedPendingApprovalUsersWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :users
......
......@@ -2,6 +2,8 @@
class ArchiveTraceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineBackgroundQueue
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -3,6 +3,8 @@
class AuthorizedKeysWorker
include ApplicationWorker
sidekiq_options retry: 3
PERMITTED_ACTIONS = %w[add_key remove_key].freeze
feature_category :source_code_management
......
......@@ -3,6 +3,8 @@
module AuthorizedProjectUpdate
class PeriodicRecalculateWorker
include ApplicationWorker
sidekiq_options retry: 3
# This worker does not perform work scoped to a context
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
......@@ -4,6 +4,8 @@ module AuthorizedProjectUpdate
class ProjectCreateWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :authentication_and_authorization
urgency :low
queue_namespace :authorized_project_update
......
......@@ -4,6 +4,8 @@ module AuthorizedProjectUpdate
class ProjectGroupLinkCreateWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :authentication_and_authorization
urgency :low
queue_namespace :authorized_project_update
......
......@@ -15,6 +15,8 @@ module AuthorizedProjectUpdate
include ApplicationWorker
sidekiq_options retry: 3
feature_category :authentication_and_authorization
urgency :low
queue_namespace :authorized_project_update
......
......@@ -2,6 +2,8 @@
class AuthorizedProjectsWorker
include ApplicationWorker
sidekiq_options retry: 3
prepend WaitableWorker
feature_category :authentication_and_authorization
......
......@@ -3,6 +3,8 @@
module AutoDevops
class DisableWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include AutoDevopsQueue
def perform(pipeline_id)
......
......@@ -3,6 +3,8 @@
class AutoMergeProcessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :auto_merge
feature_category :continuous_delivery
worker_resource_boundary :cpu
......
......@@ -3,6 +3,8 @@
class BackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :database
urgency :throttled
loggable_arguments 0, 1
......
......@@ -2,6 +2,8 @@
class BuildFinishedWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -2,6 +2,8 @@
class BuildHooksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_hooks
......
......@@ -2,6 +2,8 @@
class BuildQueueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -2,6 +2,8 @@
class BuildSuccessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -3,6 +3,8 @@
module Chaos
class CpuSpinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ChaosQueue
def perform(duration_s)
......
......@@ -3,6 +3,8 @@
module Chaos
class DbSpinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ChaosQueue
def perform(duration_s, interval_s)
......
......@@ -3,6 +3,8 @@
module Chaos
class LeakMemWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ChaosQueue
def perform(memory_mb, duration_s)
......
......@@ -3,6 +3,8 @@
module Chaos
class SleepWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ChaosQueue
def perform(duration_s)
......
......@@ -3,6 +3,8 @@
module Ci
class ArchiveTracesCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :continuous_integration
......
......@@ -3,6 +3,8 @@
module Ci
class BuildPrepareWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -3,6 +3,8 @@
module Ci
class BuildScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -3,6 +3,8 @@
module Ci
class BuildTraceChunkFlushWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineBackgroundQueue
deduplicate :until_executed
......
......@@ -5,6 +5,7 @@ module Ci
include ::ApplicationWorker
include ::PipelineQueue
sidekiq_options retry: 3
worker_resource_boundary :cpu
def perform(bridge_id)
......
......@@ -3,6 +3,8 @@
module Ci
class DailyBuildGroupReportResultsWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineBackgroundQueue
feature_category :code_testing
......
......@@ -3,6 +3,8 @@
module Ci
class DeleteObjectsWorker
include ApplicationWorker
sidekiq_options retry: 3
include LimitedCapacity::Worker
feature_category :continuous_integration
......
......@@ -3,6 +3,8 @@
module Ci
class DropPipelineWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
idempotent!
......
......@@ -3,6 +3,8 @@
module Ci
class InitialPipelineProcessWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -3,6 +3,8 @@ module Ci
module MergeRequests
class AddTodoWhenBuildFailsWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
urgency :low
......
......@@ -4,6 +4,8 @@ module Ci
module PipelineArtifacts
class CoverageReportWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineBackgroundQueue
feature_category :code_testing
......
......@@ -5,6 +5,8 @@ module Ci
class CreateQualityReportWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :pipeline_background
feature_category :code_testing
......
......@@ -4,6 +4,8 @@ module Ci
module PipelineArtifacts
class ExpireArtifactsWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -5,6 +5,7 @@ module Ci
include ::ApplicationWorker
include ::PipelineQueue
sidekiq_options retry: 3
urgency :high
worker_resource_boundary :cpu
......
......@@ -3,6 +3,8 @@
module Ci
class PipelineSuccessUnlockArtifactsWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineBackgroundQueue
idempotent!
......
......@@ -3,6 +3,8 @@
module Ci
class RefDeleteUnlockArtifactsWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineBackgroundQueue
idempotent!
......
......@@ -4,6 +4,8 @@ module Ci
module ResourceGroups
class AssignResourceFromResourceGroupWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -3,6 +3,8 @@
module Ci
class ScheduleDeleteObjectsCronWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
module Ci
class TestFailureHistoryWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineBackgroundQueue
idempotent!
......
......@@ -3,6 +3,8 @@
class CiPlatformMetricsUpdateCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# This worker does not perform work scoped to a context
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
......@@ -3,6 +3,8 @@
class CleanupContainerRepositoryWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :container_repository
feature_category :container_registry
urgency :low
......
......@@ -2,6 +2,8 @@
class ClusterConfigureIstioWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
worker_has_external_dependencies!
......
......@@ -2,6 +2,8 @@
class ClusterInstallAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -2,6 +2,8 @@
class ClusterPatchAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -2,6 +2,8 @@
class ClusterProvisionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
worker_has_external_dependencies!
......
......@@ -2,6 +2,8 @@
class ClusterUpgradeAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -2,6 +2,8 @@
class ClusterWaitForAppInstallationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -2,6 +2,8 @@
class ClusterWaitForAppUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -2,6 +2,8 @@
class ClusterWaitForIngressIpAddressWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -4,6 +4,8 @@ module Clusters
module Applications
class ActivateServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
loggable_arguments 1
......
......@@ -4,6 +4,8 @@ module Clusters
module Applications
class CheckPrometheusHealthWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -4,6 +4,8 @@ module Clusters
module Applications
class DeactivateServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
loggable_arguments 1
......
......@@ -4,6 +4,8 @@ module Clusters
module Applications
class UninstallWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -4,6 +4,8 @@ module Clusters
module Applications
class WaitForUninstallAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
include ClusterApplications
......
......@@ -9,6 +9,8 @@ module Gitlab
included do
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include ReschedulingMethods
include Gitlab::NotifyUponDeath
......
......@@ -7,6 +7,8 @@ module Gitlab
included do
include ApplicationWorker
sidekiq_options retry: 3
include ProjectImportOptions
include Gitlab::JiraImport::QueueOptions
end
......
......@@ -6,6 +6,8 @@ module ReactiveCacheableWorker
included do
include ApplicationWorker
sidekiq_options retry: 3
feature_category_not_owned!
loggable_arguments 0
......
......@@ -3,6 +3,8 @@
module ContainerExpirationPolicies
class CleanupContainerRepositoryWorker
include ApplicationWorker
sidekiq_options retry: 3
include LimitedCapacity::Worker
include Gitlab::Utils::StrongMemoize
......
......@@ -2,6 +2,8 @@
class ContainerExpirationPolicyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
include ExclusiveLeaseGuard
......
......@@ -3,6 +3,8 @@
class CreateCommitSignatureWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
weight 2
idempotent!
......
......@@ -3,6 +3,8 @@
class CreateNoteDiffFileWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
def perform(diff_note_id)
......
......@@ -2,6 +2,8 @@
class CreatePipelineWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_creation
......
......@@ -3,6 +3,8 @@
module Database
class BatchedBackgroundMigrationWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database
......
......@@ -2,6 +2,8 @@
class DeleteContainerRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExclusiveLeaseGuard
queue_namespace :container_repository
......
......@@ -3,6 +3,8 @@
class DeleteDiffFilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -3,6 +3,8 @@
class DeleteMergedBranchesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
def perform(project_id, user_id)
......
......@@ -3,6 +3,8 @@
class DeleteStoredFilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category_not_owned!
loggable_arguments 0
......
......@@ -3,6 +3,8 @@
class DeleteUserWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :authentication_and_authorization
loggable_arguments 2
......
......@@ -4,6 +4,8 @@ module Deployments
class DropOlderDeploymentsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :deployment
feature_category :continuous_delivery
......
......@@ -5,6 +5,8 @@ module Deployments
class ExecuteHooksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :deployment
feature_category :continuous_delivery
worker_resource_boundary :cpu
......
......@@ -6,6 +6,8 @@ module Deployments
class FinishedWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :deployment
feature_category :continuous_delivery
worker_resource_boundary :cpu
......
......@@ -6,6 +6,8 @@ module Deployments
class ForwardDeploymentWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :deployment
feature_category :continuous_delivery
......
......@@ -4,6 +4,8 @@ module Deployments
class LinkMergeRequestWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :deployment
idempotent!
feature_category :continuous_delivery
......
......@@ -6,6 +6,8 @@ module Deployments
class SuccessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :deployment
feature_category :continuous_delivery
worker_resource_boundary :cpu
......
......@@ -4,6 +4,8 @@ module Deployments
class UpdateEnvironmentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :deployment
idempotent!
feature_category :continuous_delivery
......
......@@ -4,6 +4,8 @@ module DesignManagement
class CopyDesignCollectionWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :design_management
idempotent!
urgency :low
......
......@@ -4,6 +4,8 @@ module DesignManagement
class NewVersionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :design_management
# Declare this worker as memory bound due to
# `GenerateImageVersionsService` resizing designs
......
......@@ -2,6 +2,8 @@
class DisallowTwoFactorForGroupWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExceptionBacktrace
feature_category :subgroups
......
......@@ -2,6 +2,8 @@
class DisallowTwoFactorForSubgroupsWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExceptionBacktrace
INTERVAL = 2.seconds.to_i
......
......@@ -3,6 +3,8 @@
class EmailReceiverWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :issue_tracking
urgency :high
weight 2
......
......@@ -3,6 +3,8 @@
class EmailsOnPushWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
attr_reader :email, :skip_premailer
feature_category :source_code_management
......
......@@ -3,6 +3,8 @@
module Environments
class AutoStopCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :continuous_delivery
......
......@@ -7,6 +7,8 @@
# until the prior link is deleted.
class ErrorTrackingIssueLinkWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExclusiveLeaseGuard
include Gitlab::Utils::StrongMemoize
......
......@@ -4,6 +4,8 @@ module Experiments
class RecordConversionEventWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :users
urgency :low
......
......@@ -2,6 +2,8 @@
class ExpireBuildArtifactsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
class ExpireBuildInstanceArtifactsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :continuous_integration
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -2,6 +2,8 @@
class ExpireJobCacheWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_cache
......
......@@ -2,6 +2,8 @@
class ExpirePipelineCacheWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_cache
......
......@@ -3,6 +3,8 @@
class ExportCsvWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :issue_tracking
worker_resource_boundary :cpu
loggable_arguments 2
......
......@@ -8,6 +8,8 @@
class FlushCounterIncrementsWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category_not_owned!
urgency :low
deduplicate :until_executing, including_scheduled: true
......
......@@ -8,6 +8,8 @@ module Gitlab
# stage.
class AdvanceStageWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ::Gitlab::Import::AdvanceStage
sidekiq_options dead: false
......
......@@ -4,6 +4,8 @@ module Gitlab
module GithubImport
class RefreshImportJidWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
# The interval to schedule new instances of this job at.
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class FinishImportWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportBaseDataWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportIssuesAndDiffNotesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportLfsObjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportNotesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportPullRequestsMergedByWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportPullRequestsReviewsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportPullRequestsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class ImportRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GithubImport::Queue
include StageMethods
......
......@@ -9,6 +9,8 @@ module Gitlab
included do
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker updates several import states inline and does not schedule
# other jobs. So no context needed
......
......@@ -4,6 +4,8 @@ module Gitlab
module JiraImport
class AdvanceStageWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include QueueOptions
include ::Gitlab::Import::AdvanceStage
......
......@@ -4,6 +4,8 @@ module Gitlab
module JiraImport
class ImportIssueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include NotifyUponDeath
include Gitlab::JiraImport::QueueOptions
include Gitlab::Import::DatabaseHelpers
......
......@@ -5,6 +5,8 @@ module Gitlab
module Stage
class StartImportWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ProjectStartImport
include ProjectImportOptions
include Gitlab::JiraImport::QueueOptions
......
......@@ -3,6 +3,8 @@ module Gitlab
module PhabricatorImport
class ImportTasksWorker < BaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ProjectImportOptions # This marks the project as failed after too many tries
def importer_class
......
......@@ -3,6 +3,8 @@
class GitlabPerformanceBarStatsWorker
include ApplicationWorker
sidekiq_options retry: 3
LEASE_KEY = 'gitlab:performance_bar_stats'
LEASE_TIMEOUT = 600
WORKER_DELAY = 120
......
......@@ -2,6 +2,8 @@
class GitlabShellWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::ShellAdapter
feature_category :source_code_management
......
......@@ -2,6 +2,8 @@
class GroupDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExceptionBacktrace
feature_category :subgroups
......
......@@ -4,6 +4,8 @@ module HashedStorage
class MigratorWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :hashed_storage
feature_category :source_code_management
......
......@@ -4,6 +4,8 @@ module HashedStorage
class ProjectMigrateWorker < BaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :hashed_storage
loggable_arguments 1
......
......@@ -4,6 +4,8 @@ module HashedStorage
class ProjectRollbackWorker < BaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :hashed_storage
loggable_arguments 1
......
......@@ -4,6 +4,8 @@ module HashedStorage
class RollbackerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :hashed_storage
feature_category :source_code_management
......
......@@ -2,6 +2,8 @@
class ImportExportProjectCleanupWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
class ImportIssuesCsvWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :issue_tracking
worker_resource_boundary :cpu
......
......@@ -4,6 +4,8 @@ module IncidentManagement
class AddSeveritySystemNoteWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :incident_management
feature_category :incident_management
......
......@@ -5,6 +5,8 @@ module IncidentManagement
class ProcessIncidentWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :incident_management
feature_category :incident_management
......
......@@ -4,6 +4,8 @@ module IncidentManagement
class ProcessAlertWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :incident_management
feature_category :incident_management
......
......@@ -4,6 +4,8 @@ module IncidentManagement
class ProcessPrometheusAlertWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :incident_management
feature_category :incident_management
worker_resource_boundary :cpu
......
......@@ -3,6 +3,8 @@
class InvalidGpgSignatureUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
weight 2
......
......@@ -6,6 +6,8 @@ require 'socket'
class IrkerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
def perform(project_id, channels, colors, push_data, settings)
......
......@@ -3,6 +3,8 @@
class IssuableExportCsvWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :issue_tracking
worker_resource_boundary :cpu
loggable_arguments 2
......
......@@ -2,6 +2,8 @@
class IssueDueSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :issue_tracking
......
......@@ -3,6 +3,8 @@
class IssuePlacementWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
deduplicate :until_executed, including_scheduled: true
feature_category :issue_tracking
......
......@@ -3,6 +3,8 @@
class IssueRebalancingWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
urgency :low
feature_category :issue_tracking
......
......@@ -4,6 +4,8 @@ module JiraConnect
class SyncBranchWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :jira_connect
feature_category :integrations
loggable_arguments 1, 2
......
......@@ -4,6 +4,8 @@ module JiraConnect
class SyncBuildsWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
worker_has_external_dependencies!
......
......@@ -4,6 +4,8 @@ module JiraConnect
class SyncDeploymentsWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
worker_has_external_dependencies!
......
......@@ -4,6 +4,8 @@ module JiraConnect
class SyncFeatureFlagsWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
worker_has_external_dependencies!
......
......@@ -4,6 +4,8 @@ module JiraConnect
class SyncMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :jira_connect
feature_category :integrations
idempotent!
......
......@@ -4,6 +4,8 @@ module JiraConnect
class SyncProjectWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :jira_connect
feature_category :integrations
idempotent!
......
......@@ -3,6 +3,8 @@
module MailScheduler
class IssueDueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include MailSchedulerQueue
feature_category :issue_tracking
......
......@@ -5,6 +5,8 @@ require 'active_job/arguments'
module MailScheduler
class NotificationServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include MailSchedulerQueue
feature_category :issue_tracking
......
......@@ -2,6 +2,8 @@
class MemberInvitationReminderEmailsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups
......
......@@ -4,6 +4,8 @@ module MembersDestroyer
class UnassignIssuablesWorker
include ApplicationWorker
sidekiq_options retry: 3
ENTITY_TYPES = %w(Group Project).freeze
queue_namespace :unassign_issuables
......
......@@ -3,6 +3,8 @@
class MergeRequestCleanupRefsWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
idempotent!
......
......@@ -3,6 +3,8 @@
class MergeRequestMergeabilityCheckWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
idempotent!
......
......@@ -3,6 +3,8 @@
class MergeRequests::AssigneesChangeWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
urgency :high
deduplicate :until_executed
......
......@@ -3,6 +3,8 @@
module MergeRequests
class CreatePipelineWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_creation
......
......@@ -3,6 +3,8 @@
class MergeRequests::DeleteSourceBranchWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
urgency :high
idempotent!
......
......@@ -3,6 +3,8 @@
class MergeRequests::HandleAssigneesChangeWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
urgency :high
deduplicate :until_executed
......
......@@ -3,6 +3,8 @@
class MergeRequests::ResolveTodosWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
urgency :high
deduplicate :until_executed
......
......@@ -3,6 +3,8 @@
class MergeWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
urgency :high
weight 5
......
......@@ -5,6 +5,8 @@ module Metrics
class PruneOldAnnotationsWorker
include ApplicationWorker
sidekiq_options retry: 3
DELETE_LIMIT = 10_000
DEFAULT_CUT_OFF_PERIOD = 2.weeks
......
......@@ -4,6 +4,8 @@ module Metrics
module Dashboard
class ScheduleAnnotationsPruneWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -5,6 +5,8 @@ module Metrics
class SyncDashboardsWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :metrics
idempotent!
......
......@@ -3,6 +3,8 @@
class MigrateExternalDiffsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
def perform(merge_request_diff_id)
......
......@@ -8,6 +8,8 @@
# namespace. For those use ProjectDestroyWorker instead.
class NamespacelessProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExceptionBacktrace
feature_category :authentication_and_authorization
......
......@@ -3,6 +3,8 @@
module Namespaces
class InProductMarketingEmailsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups
......
......@@ -4,6 +4,8 @@ module Namespaces
class OnboardingIssueCreatedWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :issue_tracking
urgency :low
......
......@@ -4,6 +4,8 @@ module Namespaces
class OnboardingPipelineCreatedWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :subgroups
urgency :low
......
......@@ -4,6 +4,8 @@ module Namespaces
class OnboardingProgressWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :product_analytics
urgency :low
......
......@@ -4,6 +4,8 @@ module Namespaces
class OnboardingUserAddedWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :users
urgency :low
......
......@@ -3,6 +3,8 @@
module Namespaces
class PruneAggregationSchedulesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :source_code_management
......
......@@ -4,6 +4,8 @@ module Namespaces
class RootStatisticsWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :update_namespace_statistics
feature_category :source_code_management
idempotent!
......
......@@ -4,6 +4,8 @@ module Namespaces
class ScheduleAggregationWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :update_namespace_statistics
feature_category :source_code_management
idempotent!
......
......@@ -2,6 +2,8 @@
class NewIssueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include NewIssuable
feature_category :issue_tracking
......
......@@ -2,6 +2,8 @@
class NewMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include NewIssuable
feature_category :code_review
......
......@@ -3,6 +3,8 @@
class NewNoteWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :issue_tracking
urgency :high
worker_resource_boundary :cpu
......
......@@ -3,6 +3,8 @@
module ObjectPool
class CreateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ObjectPoolQueue
include ExclusiveLeaseGuard
......
......@@ -3,6 +3,8 @@
module ObjectPool
class DestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ObjectPoolQueue
def perform(pool_repository_id)
......
......@@ -3,6 +3,8 @@
module ObjectPool
class JoinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ObjectPoolQueue
worker_resource_boundary :cpu
......
......@@ -3,6 +3,8 @@
module ObjectPool
class ScheduleJoinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ObjectPoolQueue
def perform(pool_id)
......
......@@ -4,6 +4,8 @@
module ObjectStorage
class MigrateUploadsWorker
include ApplicationWorker
sidekiq_options retry: 3
include ObjectStorageQueue
feature_category_not_owned!
......
......@@ -4,6 +4,8 @@ module Packages
module Composer
class CacheCleanupWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :package_registry
......
......@@ -5,6 +5,8 @@ module Packages
class CacheUpdateWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :package_registry
idempotent!
......
......@@ -4,6 +4,8 @@ module Packages
module Go
class SyncPackagesWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::Golang
queue_namespace :package_repositories
......
......@@ -5,6 +5,8 @@ module Packages
module Metadata
class SyncWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::Utils::StrongMemoize
queue_namespace :package_repositories
......
......@@ -5,6 +5,8 @@ module Packages
class ExtractionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :package_repositories
feature_category :package_registry
......
......@@ -5,6 +5,8 @@ module Packages
class ExtractionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :package_repositories
feature_category :package_registry
deduplicate :until_executing
......
......@@ -2,6 +2,8 @@
class PagesDomainRemovalCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :pages
......
......@@ -2,6 +2,8 @@
class PagesDomainSslRenewalCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :pages
......
......@@ -3,6 +3,8 @@
class PagesDomainSslRenewalWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :pages
tags :requires_disk_io
......
......@@ -2,6 +2,8 @@
class PagesDomainVerificationCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :pages
......
......@@ -3,6 +3,8 @@
class PagesDomainVerificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :pages
tags :requires_disk_io
......
......@@ -3,6 +3,8 @@
class PagesTransferWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
TransferFailedError = Class.new(StandardError)
feature_category :pages
......
......@@ -3,6 +3,8 @@
class PagesUpdateConfigurationWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :pages
......
......@@ -2,6 +2,8 @@
class PartitionCreationWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database
......
......@@ -3,6 +3,8 @@
module PersonalAccessTokens
class ExpiredNotificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :authentication_and_authorization
......
......@@ -3,6 +3,8 @@
module PersonalAccessTokens
class ExpiringWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :authentication_and_authorization
......
......@@ -2,6 +2,8 @@
class PipelineHooksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_hooks
......
......@@ -2,6 +2,8 @@
class PipelineMetricsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
urgency :high
......
......@@ -2,6 +2,8 @@
class PipelineNotificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
urgency :high
......
......@@ -2,6 +2,8 @@
class PipelineProcessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -2,6 +2,8 @@
class PipelineScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :continuous_integration
......
......@@ -4,6 +4,8 @@
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/232806
class PipelineUpdateWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -2,6 +2,8 @@
class PostReceive # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::Experiment::Dsl
feature_category :source_code_management
......
......@@ -10,6 +10,8 @@
class ProcessCommitWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
urgency :high
weight 3
......
......@@ -4,6 +4,8 @@
class ProjectCacheWorker
include ApplicationWorker
sidekiq_options retry: 3
LEASE_TIMEOUT = 15.minutes.to_i
feature_category :source_code_management
......
......@@ -4,6 +4,8 @@
class ProjectDailyStatisticsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
def perform(project_id)
......
......@@ -2,6 +2,8 @@
class ProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExceptionBacktrace
feature_category :source_code_management
......
......@@ -3,6 +3,8 @@
class ProjectServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
sidekiq_options dead: false
feature_category :integrations
worker_has_external_dependencies!
......
......@@ -4,6 +4,8 @@ module Projects
class PostCreationWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
idempotent!
......
......@@ -4,6 +4,8 @@ module Projects
class ScheduleBulkRepositoryShardMovesWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :gitaly
urgency :throttled
......
......@@ -5,6 +5,8 @@ module Projects
extend ::Gitlab::Utils::Override
include ::UpdateRepositoryStorageWorker
sidekiq_options retry: 3
private
override :find_repository_storage_move
......
......@@ -4,6 +4,8 @@ module Prometheus
class CreateDefaultAlertsWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :incident_management
urgency :high
idempotent!
......
......@@ -3,6 +3,8 @@
class PropagateIntegrationGroupWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
idempotent!
......
......@@ -3,6 +3,8 @@
class PropagateIntegrationInheritDescendantWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
idempotent!
......
......@@ -3,6 +3,8 @@
class PropagateIntegrationInheritWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
idempotent!
......
......@@ -3,6 +3,8 @@
class PropagateIntegrationProjectWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
idempotent!
......
......@@ -3,6 +3,8 @@
class PropagateIntegrationWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
idempotent!
loggable_arguments 1
......
......@@ -4,6 +4,8 @@
class PropagateServiceTemplateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
LEASE_TIMEOUT = 4.hours.to_i
......
......@@ -2,6 +2,8 @@
class PruneOldEventsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -4,6 +4,8 @@
# table.
class PruneWebHookLogsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -2,6 +2,8 @@
class PurgeDependencyProxyCacheWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::Allowable
idempotent!
......
......@@ -5,6 +5,8 @@
class RebaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
weight 2
loggable_arguments 2
......
......@@ -4,6 +4,8 @@ module Releases
class CreateEvidenceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :release_evidence
# pipeline_id is optional for backward compatibility with existing jobs
......
......@@ -3,6 +3,8 @@
module Releases
class ManageEvidenceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :release_evidence
......
......@@ -3,6 +3,8 @@
class RemoteMirrorNotificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
weight 2
......
......@@ -2,6 +2,8 @@
class RemoveExpiredGroupLinksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :authentication_and_authorization
......
......@@ -2,6 +2,8 @@
class RemoveExpiredMembersWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :authentication_and_authorization
......
......@@ -2,6 +2,8 @@
class RemoveUnacceptedMemberInvitesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :authentication_and_authorization
......
......@@ -2,6 +2,8 @@
class RemoveUnreferencedLfsObjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -2,6 +2,8 @@
class RepositoryArchiveCacheWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
module RepositoryCheck
class BatchWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include RepositoryCheckQueue
include ExclusiveLeaseGuard
......
......@@ -3,6 +3,8 @@
module RepositoryCheck
class ClearWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include RepositoryCheckQueue
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -3,6 +3,8 @@
module RepositoryCheck
class DispatchWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
module RepositoryCheck
class SingleRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include RepositoryCheckQueue
def perform(project_id)
......
......@@ -2,6 +2,8 @@
class RepositoryForkWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ProjectStartImport
include ProjectImportOptions
......
......@@ -2,6 +2,8 @@
class RepositoryRemoveRemoteWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExclusiveLeaseGuard
feature_category :source_code_management
......
......@@ -2,6 +2,8 @@
class RequestsProfilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -2,6 +2,8 @@
class RunPipelineScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_creation
......
......@@ -2,6 +2,8 @@
class ScheduleMergeRequestCleanupRefsWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review
......
......@@ -2,6 +2,8 @@
class ScheduleMigrateExternalDiffsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext:
# This schedules the `MigrateExternalDiffsWorker`
# issue for adding context: https://gitlab.com/gitlab-org/gitlab/issues/202100
......
......@@ -2,6 +2,8 @@
class SelfMonitoringProjectCreateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExclusiveLeaseGuard
include SelfMonitoringProjectWorker
......
......@@ -2,6 +2,8 @@
class SelfMonitoringProjectDeleteWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExclusiveLeaseGuard
include SelfMonitoringProjectWorker
......
......@@ -3,6 +3,8 @@
class ServiceDeskEmailReceiverWorker < EmailReceiverWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
def perform(raw)
return unless ::Gitlab::ServiceDeskEmail.enabled?
......
......@@ -4,6 +4,8 @@ module Snippets
class ScheduleBulkRepositoryShardMovesWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :gitaly
urgency :throttled
......
......@@ -5,6 +5,8 @@ module Snippets
extend ::Gitlab::Utils::Override
include ::UpdateRepositoryStorageWorker
sidekiq_options retry: 3
private
override :find_repository_storage_move
......
......@@ -3,6 +3,8 @@
module SshKeys
class ExpiredNotificationWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :compliance_management
......
......@@ -3,6 +3,8 @@
module SshKeys
class ExpiringSoonNotificationWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :compliance_management
......
......@@ -2,6 +2,8 @@
class StageUpdateWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -2,6 +2,8 @@
class StuckCiJobsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :continuous_integration
......
......@@ -3,6 +3,8 @@
# rubocop:disable Scalability/IdempotentWorker
class StuckExportJobsWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker updates export states inline and does not schedule
# other jobs.
......
......@@ -2,6 +2,8 @@
class StuckMergeJobsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review
......
......@@ -3,6 +3,8 @@
class SystemHookPushWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
def perform(push_data, hook_id)
......
......@@ -3,6 +3,8 @@
module TodosDestroyer
class ConfidentialIssueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include TodosDestroyerQueue
def perform(issue_id = nil, project_id = nil)
......
......@@ -3,6 +3,8 @@
module TodosDestroyer
class DestroyedIssuableWorker
include ApplicationWorker
sidekiq_options retry: 3
include TodosDestroyerQueue
idempotent!
......
......@@ -3,6 +3,8 @@
module TodosDestroyer
class EntityLeaveWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include TodosDestroyerQueue
loggable_arguments 2
......
......@@ -3,6 +3,8 @@
module TodosDestroyer
class GroupPrivateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include TodosDestroyerQueue
def perform(group_id)
......
......@@ -3,6 +3,8 @@
module TodosDestroyer
class PrivateFeaturesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include TodosDestroyerQueue
def perform(project_id, user_id = nil)
......
......@@ -3,6 +3,8 @@
module TodosDestroyer
class ProjectPrivateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include TodosDestroyerQueue
def perform(project_id)
......
......@@ -2,6 +2,8 @@
class TrendingProjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :source_code_management
......
......@@ -2,6 +2,8 @@
class UpdateContainerRegistryInfoWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :container_registry
......
......@@ -3,6 +3,8 @@
class UpdateExternalPullRequestsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
weight 3
loggable_arguments 2
......
......@@ -2,6 +2,8 @@
class UpdateHeadPipelineForMergeRequestWorker
include ApplicationWorker
sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_processing
......
......@@ -3,6 +3,8 @@
class UpdateHighestRoleWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :utilization
urgency :high
weight 2
......
......@@ -3,6 +3,8 @@
class UpdateMergeRequestsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_review
urgency :high
worker_resource_boundary :cpu
......
......@@ -4,6 +4,8 @@
class UpdateProjectStatisticsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
# project_id - The ID of the project for which to flush the cache.
......
......@@ -3,6 +3,8 @@
class UploadChecksumWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :geo_replication
def perform(upload_id)
......
......@@ -4,6 +4,8 @@ module UserStatusCleanup
# This worker will run every minute to look for user status records to clean up.
class BatchWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
include CronjobQueue
# rubocop:enable Scalability/CronWorkerContext
......
......@@ -3,6 +3,8 @@
module Users
class CreateStatisticsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,7 @@
module Users
class DeactivateDormantUsersWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
feature_category :utilization
......
......@@ -2,6 +2,8 @@
class WaitForClusterCreationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ClusterQueue
worker_has_external_dependencies!
......
......@@ -4,6 +4,8 @@ module WebHooks
class DestroyWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :integrations
urgency :low
idempotent!
......
......@@ -3,6 +3,8 @@
class X509CertificateRevokeWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
idempotent!
......
......@@ -2,6 +2,8 @@
class X509IssuerCrlCheckWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :source_code_management
......
......@@ -12,9 +12,6 @@ require 'sidekiq/web'
# CSRF protection still works (https://github.com/mperham/sidekiq/commit/315504e766c4fd88a29b7772169060afc4c40329).
Sidekiq::Web.set :sessions, false
# Default is to retry 25 times with exponential backoff. That's too much.
Sidekiq.default_worker_options = { retry: 3 }
if Rails.env.development?
Sidekiq.default_worker_options[:backtrace] = true
end
......@@ -15,6 +15,36 @@ All workers should include `ApplicationWorker` instead of `Sidekiq::Worker`,
which adds some convenience methods and automatically sets the queue based on
the worker's name.
## Retries
Sidekiq defaults to using [25
retries](https://github.com/mperham/sidekiq/wiki/Error-Handling#automatic-job-retry),
with back-off between each retry. 25 retries means that the last retry
would happen around three weeks after the first attempt (assuming all 24
prior retries failed).
For most workers - especially [idempotent workers](#idempotent-jobs) -
the default of 25 retries is more than sufficient. Many of our older
workers declare 3 retries, which used to be the default within the
GitLab application. 3 retries happen over the course of a couple of
minutes, so the jobs are prone to failing completely.
A lower retry count may be applicable if any of the below apply:
1. The worker contacts an external service and we do not provide
guarantees on delivery. For example, webhooks.
1. The worker is not idempotent and running it multiple times could
leave the system in an inconsistent state. For example, a worker that
posts a system note and then performs an action: if the second step
fails and the worker retries, the system note will be posted again.
1. The worker is a cronjob that runs frequently. For example, if a cron
job runs every hour, then we don't need to retry beyond an hour
because we don't need two of the same job running at once.
Each retry for a worker is counted as a failure in our metrics. A worker
which always fails 9 times and succeeds on the 10th would have a 90%
error rate.
## Dedicated Queues
All workers should use their own queue, which is automatically set based on the
......@@ -719,6 +749,23 @@ possible situations:
1. A job is queued by a node running the newer version of the application, but
executed on a node running an older version of the application.
### Adding new workers
On GitLab.com, we [do not currently have a Sidekiq deployment in the
canary stage](https://gitlab.com/gitlab-org/gitlab/-/issues/19239). This
means that a new worker than can be scheduled from an HTTP endpoint may
be scheduled from canary but not run on Sidekiq until the full
production deployment is complete. This can be several hours later than
scheduling the job. For some workers, this will not be a problem. For
others - particularly [latency-sensitive
jobs](#latency-sensitive-jobs) - this will result in a poor user
experience.
This only applies to new worker classes when they are first introduced.
As we recommend [using feature flags](feature_flags/) as a general
development process, it's best to control the entire change (including
scheduling of the new Sidekiq worker) with a feature flag.
### Changing the arguments for a worker
Jobs need to be backward and forward compatible between consecutive versions
......
......@@ -2,6 +2,8 @@
class ActiveUserCountThresholdWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -2,6 +2,8 @@
class AdjournedGroupDeletionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
INTERVAL = 10.seconds.to_i
......
......@@ -2,6 +2,8 @@
class AdjournedProjectDeletionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExceptionBacktrace
feature_category :authentication_and_authorization
......
......@@ -2,6 +2,8 @@
class AdjournedProjectsDeletionCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
INTERVAL = 10.seconds.to_i
......
......@@ -3,6 +3,8 @@
class AdminEmailsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :issue_tracking
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -4,6 +4,8 @@ module Analytics
class CodeReviewMetricsWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :code_analytics
idempotent!
loggable_arguments 0
......
......@@ -5,6 +5,8 @@ module Analytics
# Schedules update of snapshots for all segments
class CreateAllSnapshotsWorker
include ApplicationWorker
sidekiq_options retry: 3
# This worker does not perform work scoped to a context
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
......@@ -7,6 +7,8 @@ module Analytics
class CreateSnapshotWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :devops_reports
idempotent!
......
......@@ -3,6 +3,8 @@
module ApprovalRules
class ExternalApprovalRulePayloadWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :source_code_management
......
......@@ -5,6 +5,7 @@ module Ci
include ::ApplicationWorker
include ::PipelineQueue
sidekiq_options retry: 3
worker_resource_boundary :cpu
def perform(pipeline_id)
......
......@@ -2,6 +2,8 @@
class ClearSharedRunnersMinutesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
# all queries are scoped across multiple namespaces
......
......@@ -6,6 +6,8 @@ module Elastic
included do
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::ExclusiveLeaseHelpers
# There is no onward scheduling and this cron handles work from across the
# application, so there's no useful context to add.
......
......@@ -2,6 +2,8 @@
class CreateGithubWebhookWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GrapePathHelpers::NamedRouteMatcher
feature_category :integrations
......
......@@ -4,6 +4,8 @@ module Deployments
class AutoRollbackWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :continuous_delivery
queue_namespace :deployment
......
......@@ -5,6 +5,8 @@ module Dora
class RefreshWorker
include ApplicationWorker
sidekiq_options retry: 3
deduplicate :until_executing
idempotent!
queue_namespace :dora_metrics
......
......@@ -3,6 +3,8 @@
module Elastic
class MigrationWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::ExclusiveLeaseHelpers
# There is no onward scheduling and this cron handles work from across the
# application, so there's no useful context to add.
......
......@@ -3,6 +3,8 @@
class ElasticAssociationIndexerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :global_search
loggable_arguments 0, 2
......
......@@ -3,6 +3,8 @@
class ElasticIndexingControlWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :global_search
idempotent!
......
......@@ -2,6 +2,8 @@
class ElasticRemoveExpiredNamespaceSubscriptionsFromIndexCronWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::ExclusiveLeaseHelpers
include CronjobQueue
......
......@@ -4,6 +4,8 @@ module Epics
class UpdateEpicsDatesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :epics
feature_category :epics
......
......@@ -8,6 +8,8 @@ module Geo
# If multiple jobs are scheduled, only one will run and the others will drop forever.
class ProjectRegistrySchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include ExclusiveLeaseGuard
include ::Gitlab::Geo::LogHelpers
......
......@@ -8,6 +8,8 @@ module Geo
# If multiple jobs are scheduled, only one will run and the others will drop forever.
class ProjectRegistryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include ::Gitlab::Geo::LogHelpers
......
......@@ -3,6 +3,8 @@
module Geo
class DestroyWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include ::Gitlab::Geo::LogHelpers
......
......@@ -3,6 +3,8 @@
module Geo
class FileRegistryRemovalWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include ::Gitlab::Geo::LogHelpers
......
......@@ -3,6 +3,8 @@
module Geo
class FileRemovalWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::Geo::LogHelpers
include GeoQueue
......
......@@ -3,6 +3,8 @@
module Geo
class HashedStorageAttachmentsMigrationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
loggable_arguments 1, 2
......
......@@ -3,6 +3,8 @@
module Geo
class HashedStorageMigrationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
loggable_arguments 1, 2, 2
......
......@@ -3,6 +3,8 @@
module Geo
class MetricsUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExclusiveLeaseGuard
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
......@@ -3,6 +3,8 @@
module Geo
class PruneEventLogWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
module Geo
class RenameRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
loggable_arguments 1, 2
......
......@@ -3,6 +3,8 @@
module Geo
class RepositoriesCleanUpWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ExclusiveLeaseGuard
include GeoQueue
include Gitlab::Geo::LogHelpers
......
......@@ -3,6 +3,8 @@
module Geo
class RepositoryCleanupWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include ::Gitlab::Geo::LogHelpers
include ::Gitlab::Utils::StrongMemoize
......
......@@ -3,6 +3,8 @@
module Geo
class ReverificationBatchWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include LimitedCapacity::Worker
include ::Gitlab::Geo::LogHelpers
......
......@@ -4,6 +4,8 @@ module Geo
module Scheduler
class PerShardSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -4,6 +4,8 @@ module Geo
module Scheduler
class SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include ExclusiveLeaseGuard
include ::Gitlab::Geo::LogHelpers
......
......@@ -7,6 +7,8 @@ module Geo
# sync work only have to query the registry table for never-synced records.
class RegistryConsistencyWorker
include ApplicationWorker
sidekiq_options retry: 3
prepend Reenqueuer
include ::Gitlab::Geo::LogHelpers
......
......@@ -5,6 +5,8 @@ module Geo
LEASE_TIMEOUT = 24.hours.freeze
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
include ::Gitlab::Geo::LogHelpers
include ExclusiveLeaseGuard
......
......@@ -3,6 +3,8 @@
module Geo
class SidekiqCronConfigWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
module Geo
class VerificationBatchWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include LimitedCapacity::Worker
include ::Gitlab::Geo::LogHelpers
......
......@@ -6,6 +6,8 @@ module Geo
#
class VerificationCronWorker
include ApplicationWorker
sidekiq_options retry: 3
include ::Gitlab::Geo::LogHelpers
# This worker does not perform work scoped to a context
......
......@@ -2,6 +2,8 @@
class GeoRepositoryDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include GeoQueue
include ::Gitlab::Geo::LogHelpers
......
......@@ -2,6 +2,8 @@
class GroupSamlGroupSyncWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::Utils::StrongMemoize
feature_category :authentication_and_authorization
......
......@@ -4,6 +4,8 @@ module Groups
class ScheduleBulkRepositoryShardMovesWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :gitaly
urgency :throttled
......
......@@ -5,6 +5,8 @@ module Groups
extend ::Gitlab::Utils::Override
include ::UpdateRepositoryStorageWorker
sidekiq_options retry: 3
private
override :find_repository_storage_move
......
......@@ -5,6 +5,8 @@ module Groups
class UpdateStatisticsWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
idempotent!
loggable_arguments 0, 1
......
......@@ -2,6 +2,8 @@
class HistoricalDataWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
class ImportSoftwareLicensesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :cronjob
feature_category :license_compliance
......
......@@ -4,6 +4,8 @@ module IncidentManagement
class ApplyIncidentSlaExceededLabelWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :incident_management
......
......@@ -3,6 +3,8 @@
module IncidentManagement
class IncidentSlaExceededCheckWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
idempotent!
......
......@@ -5,6 +5,8 @@ module IncidentManagement
class PersistAllRotationsShiftsJob
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :incident_management
queue_namespace :cronjob
......
......@@ -9,6 +9,8 @@ module IncidentManagement
class PersistShiftsJob
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
feature_category :incident_management
......
......@@ -2,6 +2,8 @@
class IngressModsecurityCounterMetricsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
include ExclusiveLeaseGuard
......
......@@ -3,6 +3,8 @@
class IterationsUpdateStatusWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
queue_namespace :cronjob
......
......@@ -2,6 +2,8 @@
class LdapAllGroupsSyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
class LdapGroupSyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :authentication_and_authorization
worker_has_external_dependencies!
weight 2
......
......@@ -2,6 +2,8 @@
class LdapSyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :authentication_and_authorization
......
......@@ -3,6 +3,8 @@
class MergeRequestResetApprovalsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
urgency :high
worker_resource_boundary :cpu
......
......@@ -4,6 +4,8 @@ module MergeRequests
class SyncCodeOwnerApprovalRulesWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :source_code_management
urgency :high
deduplicate :until_executed
......
......@@ -4,6 +4,8 @@ module MergeTrains
class RefreshWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :auto_merge
feature_category :continuous_integration
worker_resource_boundary :cpu
......
......@@ -6,6 +6,8 @@
class NetworkPolicyMetricsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :cronjob
feature_category :container_network_security
......
......@@ -2,6 +2,8 @@
class NewEpicWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include NewIssuable
feature_category :epics
......
......@@ -5,6 +5,8 @@ module PersonalAccessTokens
class PolicyWorker
include ApplicationWorker
sidekiq_options retry: 3
idempotent!
queue_namespace :personal_access_tokens
......
......@@ -5,6 +5,8 @@ module PersonalAccessTokens
class PolicyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :personal_access_tokens
feature_category :authentication_and_authorization
......
......@@ -2,6 +2,8 @@
class PseudonymizerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,6 +3,8 @@
class RefreshLicenseComplianceChecksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :license_compliance
weight 2
......
......@@ -3,6 +3,8 @@
class RepositoryPushAuditEventWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :authentication_and_authorization
def perform(changes, project_id, user_id)
......
......@@ -3,6 +3,8 @@
module RequirementsManagement
class ImportRequirementsCsvWorker
include ApplicationWorker
sidekiq_options retry: 3
include Gitlab::Utils::StrongMemoize
idempotent!
......
......@@ -4,6 +4,8 @@ module RequirementsManagement
class ProcessRequirementsReportsWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :requirements_management
idempotent!
......
......@@ -4,6 +4,8 @@ module Security
class AutoFixWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :vulnerability_management
idempotent!
......
......@@ -3,6 +3,8 @@
module Security
class StoreScansWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include SecurityScansQueue
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -2,6 +2,8 @@
class SetUserStatusBasedOnUserCapSettingWorker
include ApplicationWorker
sidekiq_options retry: 3
include ::Gitlab::Utils::StrongMemoize
feature_category :users
......
......@@ -4,6 +4,8 @@
#
class StoreSecurityReportsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include SecurityScansQueue
worker_resource_boundary :cpu
......
......@@ -2,6 +2,8 @@
class StoreSecurityScansWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include SecurityScansQueue
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -4,6 +4,8 @@
#
class SyncSecurityReportsToReportApprovalRulesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include SecurityScansQueue
urgency :high
......
......@@ -4,6 +4,8 @@ module TodosDestroyer
class ConfidentialEpicWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :todos_destroyer
feature_category :epics
......
......@@ -2,6 +2,8 @@
class UpdateAllMirrorsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue
feature_category :source_code_management
......
......@@ -2,6 +2,8 @@
class UpdateMaxSeatsUsedForGitlabComSubscriptionsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :license
......
......@@ -4,6 +4,8 @@ module Vulnerabilities
module HistoricalStatistics
class DeletionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -5,6 +5,8 @@ module Vulnerabilities
class AdjustmentWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :vulnerability_management
def perform(project_ids)
......
......@@ -4,6 +4,8 @@ module Vulnerabilities
module Statistics
class ScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -4,6 +4,8 @@ module VulnerabilityExports
class ExportDeletionWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :vulnerability_management
idempotent!
......
......@@ -3,6 +3,8 @@
module VulnerabilityExports
class ExportWorker
include ApplicationWorker
sidekiq_options retry: 3
include ::Gitlab::ExclusiveLeaseHelpers
sidekiq_options dead: false
......
......@@ -6,10 +6,9 @@ module Gitlab
include Comparable
attr_reader :klass
delegate :feature_category_not_owned?, :get_feature_category, :get_tags,
:get_urgency, :get_weight, :get_worker_resource_boundary,
:idempotent?, :queue, :queue_namespace,
:worker_has_external_dependencies?,
delegate :feature_category_not_owned?, :get_feature_category, :get_sidekiq_options,
:get_tags, :get_urgency, :get_weight, :get_worker_resource_boundary,
:idempotent?, :queue, :queue_namespace, :worker_has_external_dependencies?,
to: :klass
def initialize(klass, ee:)
......@@ -65,6 +64,10 @@ module Gitlab
def queue_and_weight
[queue, get_weight]
end
def retries
get_sidekiq_options['retry']
end
end
end
end
......@@ -104,4 +104,374 @@ RSpec.describe 'Every Sidekiq worker' do
end
end
end
context 'retries' do
let(:cronjobs) do
workers_without_defaults.select { |worker| worker.klass < CronjobQueue }
end
let(:retry_exception_workers) do
workers_without_defaults.select { |worker| retry_exceptions.has_key?(worker.klass.to_s) }
end
let(:retry_exceptions) do
{
'AdjournedProjectDeletionWorker' => 3,
'AdminEmailsWorker' => 3,
'Analytics::CodeReviewMetricsWorker' => 3,
'Analytics::DevopsAdoption::CreateSnapshotWorker' => 3,
'Analytics::InstanceStatistics::CounterJobWorker' => 3,
'Analytics::UsageTrends::CounterJobWorker' => 3,
'ApprovalRules::ExternalApprovalRulePayloadWorker' => 3,
'ApproveBlockedPendingApprovalUsersWorker' => 3,
'ArchiveTraceWorker' => 3,
'AuthorizedKeysWorker' => 3,
'AuthorizedProjectUpdate::ProjectCreateWorker' => 3,
'AuthorizedProjectUpdate::ProjectGroupLinkCreateWorker' => 3,
'AuthorizedProjectUpdate::UserRefreshOverUserRangeWorker' => 3,
'AuthorizedProjectUpdate::UserRefreshWithLowUrgencyWorker' => 3,
'AuthorizedProjectsWorker' => 3,
'AutoDevops::DisableWorker' => 3,
'AutoMergeProcessWorker' => 3,
'BackgroundMigrationWorker' => 3,
'BuildFinishedWorker' => 3,
'BuildHooksWorker' => 3,
'BuildQueueWorker' => 3,
'BuildSuccessWorker' => 3,
'BulkImportWorker' => false,
'BulkImports::EntityWorker' => false,
'BulkImports::PipelineWorker' => false,
'Chaos::CpuSpinWorker' => 3,
'Chaos::DbSpinWorker' => 3,
'Chaos::KillWorker' => false,
'Chaos::LeakMemWorker' => 3,
'Chaos::SleepWorker' => 3,
'ChatNotificationWorker' => false,
'Ci::BatchResetMinutesWorker' => 10,
'Ci::BuildPrepareWorker' => 3,
'Ci::BuildScheduleWorker' => 3,
'Ci::BuildTraceChunkFlushWorker' => 3,
'Ci::CreateCrossProjectPipelineWorker' => 3,
'Ci::DailyBuildGroupReportResultsWorker' => 3,
'Ci::DeleteObjectsWorker' => 0,
'Ci::DropPipelineWorker' => 3,
'Ci::InitialPipelineProcessWorker' => 3,
'Ci::MergeRequests::AddTodoWhenBuildFailsWorker' => 3,
'Ci::PipelineArtifacts::CoverageReportWorker' => 3,
'Ci::PipelineArtifacts::CreateQualityReportWorker' => 3,
'Ci::PipelineBridgeStatusWorker' => 3,
'Ci::PipelineSuccessUnlockArtifactsWorker' => 3,
'Ci::RefDeleteUnlockArtifactsWorker' => 3,
'Ci::ResourceGroups::AssignResourceFromResourceGroupWorker' => 3,
'Ci::TestFailureHistoryWorker' => 3,
'Ci::TriggerDownstreamSubscriptionsWorker' => 3,
'CleanupContainerRepositoryWorker' => 3,
'ClusterConfigureIstioWorker' => 3,
'ClusterInstallAppWorker' => 3,
'ClusterPatchAppWorker' => 3,
'ClusterProvisionWorker' => 3,
'ClusterUpdateAppWorker' => 3,
'ClusterUpgradeAppWorker' => 3,
'ClusterWaitForAppInstallationWorker' => 3,
'ClusterWaitForAppUpdateWorker' => 3,
'ClusterWaitForIngressIpAddressWorker' => 3,
'Clusters::Applications::ActivateServiceWorker' => 3,
'Clusters::Applications::DeactivateServiceWorker' => 3,
'Clusters::Applications::UninstallWorker' => 3,
'Clusters::Applications::WaitForUninstallAppWorker' => 3,
'Clusters::Cleanup::AppWorker' => 3,
'Clusters::Cleanup::ProjectNamespaceWorker' => 3,
'Clusters::Cleanup::ServiceAccountWorker' => 3,
'ContainerExpirationPolicies::CleanupContainerRepositoryWorker' => 0,
'CreateCommitSignatureWorker' => 3,
'CreateGithubWebhookWorker' => 3,
'CreateNoteDiffFileWorker' => 3,
'CreatePipelineWorker' => 3,
'DastSiteValidationWorker' => 3,
'DeleteContainerRepositoryWorker' => 3,
'DeleteDiffFilesWorker' => 3,
'DeleteMergedBranchesWorker' => 3,
'DeleteStoredFilesWorker' => 3,
'DeleteUserWorker' => 3,
'Deployments::AutoRollbackWorker' => 3,
'Deployments::DropOlderDeploymentsWorker' => 3,
'Deployments::ExecuteHooksWorker' => 3,
'Deployments::FinishedWorker' => 3,
'Deployments::ForwardDeploymentWorker' => 3,
'Deployments::LinkMergeRequestWorker' => 3,
'Deployments::SuccessWorker' => 3,
'Deployments::UpdateEnvironmentWorker' => 3,
'DesignManagement::CopyDesignCollectionWorker' => 3,
'DesignManagement::NewVersionWorker' => 3,
'DestroyPagesDeploymentsWorker' => 3,
'DetectRepositoryLanguagesWorker' => 1,
'DisallowTwoFactorForGroupWorker' => 3,
'DisallowTwoFactorForSubgroupsWorker' => 3,
'Dora::DailyMetrics::RefreshWorker' => 3,
'ElasticAssociationIndexerWorker' => 3,
'ElasticCommitIndexerWorker' => 2,
'ElasticDeleteProjectWorker' => 2,
'ElasticFullIndexWorker' => 2,
'ElasticIndexerWorker' => 2,
'ElasticIndexingControlWorker' => 3,
'ElasticNamespaceIndexerWorker' => 2,
'ElasticNamespaceRolloutWorker' => 2,
'EmailReceiverWorker' => 3,
'EmailsOnPushWorker' => 3,
'Environments::CanaryIngress::UpdateWorker' => false,
'Epics::UpdateEpicsDatesWorker' => 3,
'ErrorTrackingIssueLinkWorker' => 3,
'Experiments::RecordConversionEventWorker' => 3,
'ExpireBuildInstanceArtifactsWorker' => 3,
'ExpireJobCacheWorker' => 3,
'ExpirePipelineCacheWorker' => 3,
'ExportCsvWorker' => 3,
'ExternalServiceReactiveCachingWorker' => 3,
'FileHookWorker' => false,
'FlushCounterIncrementsWorker' => 3,
'Geo::Batch::ProjectRegistrySchedulerWorker' => 3,
'Geo::Batch::ProjectRegistryWorker' => 3,
'Geo::ContainerRepositorySyncWorker' => 3,
'Geo::DesignRepositoryShardSyncWorker' => false,
'Geo::DesignRepositorySyncWorker' => 3,
'Geo::DestroyWorker' => 3,
'Geo::EventWorker' => 3,
'Geo::FileDownloadWorker' => 3,
'Geo::FileRegistryRemovalWorker' => 3,
'Geo::FileRemovalWorker' => 3,
'Geo::HashedStorageAttachmentsMigrationWorker' => 3,
'Geo::HashedStorageMigrationWorker' => 3,
'Geo::ProjectSyncWorker' => 3,
'Geo::RenameRepositoryWorker' => 3,
'Geo::RepositoriesCleanUpWorker' => 3,
'Geo::RepositoryCleanupWorker' => 3,
'Geo::RepositoryShardSyncWorker' => false,
'Geo::RepositoryVerification::Primary::ShardWorker' => false,
'Geo::RepositoryVerification::Primary::SingleWorker' => false,
'Geo::RepositoryVerification::Secondary::SingleWorker' => false,
'Geo::ReverificationBatchWorker' => 0,
'Geo::Scheduler::Primary::SchedulerWorker' => 3,
'Geo::Scheduler::SchedulerWorker' => 3,
'Geo::Scheduler::Secondary::SchedulerWorker' => 3,
'Geo::VerificationBatchWorker' => 0,
'Geo::VerificationTimeoutWorker' => false,
'Geo::VerificationWorker' => 3,
'GeoRepositoryDestroyWorker' => 3,
'GitGarbageCollectWorker' => false,
'Gitlab::GithubImport::AdvanceStageWorker' => 3,
'Gitlab::GithubImport::ImportDiffNoteWorker' => 5,
'Gitlab::GithubImport::ImportIssueWorker' => 5,
'Gitlab::GithubImport::ImportLfsObjectWorker' => 5,
'Gitlab::GithubImport::ImportNoteWorker' => 5,
'Gitlab::GithubImport::ImportPullRequestMergedByWorker' => 5,
'Gitlab::GithubImport::ImportPullRequestReviewWorker' => 5,
'Gitlab::GithubImport::ImportPullRequestWorker' => 5,
'Gitlab::GithubImport::RefreshImportJidWorker' => 5,
'Gitlab::GithubImport::Stage::FinishImportWorker' => 5,
'Gitlab::GithubImport::Stage::ImportBaseDataWorker' => 5,
'Gitlab::GithubImport::Stage::ImportIssuesAndDiffNotesWorker' => 5,
'Gitlab::GithubImport::Stage::ImportLfsObjectsWorker' => 5,
'Gitlab::GithubImport::Stage::ImportNotesWorker' => 5,
'Gitlab::GithubImport::Stage::ImportPullRequestsMergedByWorker' => 5,
'Gitlab::GithubImport::Stage::ImportPullRequestsReviewsWorker' => 5,
'Gitlab::GithubImport::Stage::ImportPullRequestsWorker' => 5,
'Gitlab::GithubImport::Stage::ImportRepositoryWorker' => 5,
'Gitlab::JiraImport::AdvanceStageWorker' => 5,
'Gitlab::JiraImport::ImportIssueWorker' => 5,
'Gitlab::JiraImport::Stage::FinishImportWorker' => 5,
'Gitlab::JiraImport::Stage::ImportAttachmentsWorker' => 5,
'Gitlab::JiraImport::Stage::ImportIssuesWorker' => 5,
'Gitlab::JiraImport::Stage::ImportLabelsWorker' => 5,
'Gitlab::JiraImport::Stage::ImportNotesWorker' => 5,
'Gitlab::JiraImport::Stage::StartImportWorker' => 5,
'Gitlab::PhabricatorImport::ImportTasksWorker' => 5,
'GitlabPerformanceBarStatsWorker' => 3,
'GitlabShellWorker' => 3,
'GitlabUsagePingWorker' => 3,
'GroupDestroyWorker' => 3,
'GroupExportWorker' => false,
'GroupImportWorker' => false,
'GroupSamlGroupSyncWorker' => 3,
'GroupWikis::GitGarbageCollectWorker' => false,
'Groups::ScheduleBulkRepositoryShardMovesWorker' => 3,
'Groups::UpdateRepositoryStorageWorker' => 3,
'Groups::UpdateStatisticsWorker' => 3,
'HashedStorage::MigratorWorker' => 3,
'HashedStorage::ProjectMigrateWorker' => 3,
'HashedStorage::ProjectRollbackWorker' => 3,
'HashedStorage::RollbackerWorker' => 3,
'ImportIssuesCsvWorker' => 3,
'ImportSoftwareLicensesWorker' => 3,
'IncidentManagement::AddSeveritySystemNoteWorker' => 3,
'IncidentManagement::ApplyIncidentSlaExceededLabelWorker' => 3,
'IncidentManagement::OncallRotations::PersistAllRotationsShiftsJob' => 3,
'IncidentManagement::OncallRotations::PersistShiftsJob' => 3,
'IncidentManagement::PagerDuty::ProcessIncidentWorker' => 3,
'IncidentManagement::ProcessAlertWorker' => 3,
'IncidentManagement::ProcessPrometheusAlertWorker' => 3,
'InvalidGpgSignatureUpdateWorker' => 3,
'IrkerWorker' => 3,
'IssuableExportCsvWorker' => 3,
'IssuePlacementWorker' => 3,
'IssueRebalancingWorker' => 3,
'IterationsUpdateStatusWorker' => 3,
'JiraConnect::SyncBranchWorker' => 3,
'JiraConnect::SyncBuildsWorker' => 3,
'JiraConnect::SyncDeploymentsWorker' => 3,
'JiraConnect::SyncFeatureFlagsWorker' => 3,
'JiraConnect::SyncMergeRequestWorker' => 3,
'JiraConnect::SyncProjectWorker' => 3,
'LdapGroupSyncWorker' => 3,
'MailScheduler::IssueDueWorker' => 3,
'MailScheduler::NotificationServiceWorker' => 3,
'MembersDestroyer::UnassignIssuablesWorker' => 3,
'MergeRequestCleanupRefsWorker' => 3,
'MergeRequestMergeabilityCheckWorker' => 3,
'MergeRequestResetApprovalsWorker' => 3,
'MergeRequests::AssigneesChangeWorker' => 3,
'MergeRequests::CreatePipelineWorker' => 3,
'MergeRequests::DeleteSourceBranchWorker' => 3,
'MergeRequests::HandleAssigneesChangeWorker' => 3,
'MergeRequests::ResolveTodosWorker' => 3,
'MergeRequests::SyncCodeOwnerApprovalRulesWorker' => 3,
'MergeTrains::RefreshWorker' => 3,
'MergeWorker' => 3,
'Metrics::Dashboard::PruneOldAnnotationsWorker' => 3,
'Metrics::Dashboard::SyncDashboardsWorker' => 3,
'MigrateExternalDiffsWorker' => 3,
'NamespacelessProjectDestroyWorker' => 3,
'Namespaces::OnboardingIssueCreatedWorker' => 3,
'Namespaces::OnboardingPipelineCreatedWorker' => 3,
'Namespaces::OnboardingProgressWorker' => 3,
'Namespaces::OnboardingUserAddedWorker' => 3,
'Namespaces::RootStatisticsWorker' => 3,
'Namespaces::ScheduleAggregationWorker' => 3,
'NetworkPolicyMetricsWorker' => 3,
'NewEpicWorker' => 3,
'NewIssueWorker' => 3,
'NewMergeRequestWorker' => 3,
'NewNoteWorker' => 3,
'ObjectPool::CreateWorker' => 3,
'ObjectPool::DestroyWorker' => 3,
'ObjectPool::JoinWorker' => 3,
'ObjectPool::ScheduleJoinWorker' => 3,
'ObjectStorage::BackgroundMoveWorker' => 5,
'ObjectStorage::MigrateUploadsWorker' => 3,
'Packages::Composer::CacheUpdateWorker' => 3,
'Packages::Go::SyncPackagesWorker' => 3,
'Packages::Maven::Metadata::SyncWorker' => 3,
'Packages::Nuget::ExtractionWorker' => 3,
'Packages::Rubygems::ExtractionWorker' => 3,
'PagesDomainSslRenewalWorker' => 3,
'PagesDomainVerificationWorker' => 3,
'PagesRemoveWorker' => 3,
'PagesTransferWorker' => 3,
'PagesUpdateConfigurationWorker' => 3,
'PagesWorker' => 3,
'PersonalAccessTokens::Groups::PolicyWorker' => 3,
'PersonalAccessTokens::Instance::PolicyWorker' => 3,
'PipelineHooksWorker' => 3,
'PipelineMetricsWorker' => 3,
'PipelineNotificationWorker' => 3,
'PipelineProcessWorker' => 3,
'PipelineUpdateWorker' => 3,
'PostReceive' => 3,
'ProcessCommitWorker' => 3,
'ProjectCacheWorker' => 3,
'ProjectDailyStatisticsWorker' => 3,
'ProjectDestroyWorker' => 3,
'ProjectExportWorker' => false,
'ProjectImportScheduleWorker' => false,
'ProjectScheduleBulkRepositoryShardMovesWorker' => 3,
'ProjectServiceWorker' => 3,
'ProjectTemplateExportWorker' => false,
'ProjectUpdateRepositoryStorageWorker' => 3,
'Projects::GitGarbageCollectWorker' => false,
'Projects::PostCreationWorker' => 3,
'Projects::ScheduleBulkRepositoryShardMovesWorker' => 3,
'Projects::UpdateRepositoryStorageWorker' => 3,
'Prometheus::CreateDefaultAlertsWorker' => 3,
'PropagateIntegrationGroupWorker' => 3,
'PropagateIntegrationInheritDescendantWorker' => 3,
'PropagateIntegrationInheritWorker' => 3,
'PropagateIntegrationProjectWorker' => 3,
'PropagateIntegrationWorker' => 3,
'PropagateServiceTemplateWorker' => 3,
'PurgeDependencyProxyCacheWorker' => 3,
'ReactiveCachingWorker' => 3,
'RebaseWorker' => 3,
'RefreshLicenseComplianceChecksWorker' => 3,
'Releases::CreateEvidenceWorker' => 3,
'RemoteMirrorNotificationWorker' => 3,
'RepositoryCheck::BatchWorker' => false,
'RepositoryCheck::ClearWorker' => false,
'RepositoryCheck::SingleRepositoryWorker' => false,
'RepositoryCleanupWorker' => 3,
'RepositoryForkWorker' => 5,
'RepositoryImportWorker' => false,
'RepositoryPushAuditEventWorker' => 3,
'RepositoryRemoveRemoteWorker' => 3,
'RepositoryUpdateMirrorWorker' => false,
'RepositoryUpdateRemoteMirrorWorker' => 3,
'RequirementsManagement::ImportRequirementsCsvWorker' => 3,
'RequirementsManagement::ProcessRequirementsReportsWorker' => 3,
'RunPipelineScheduleWorker' => 3,
'ScanSecurityReportSecretsWorker' => 17,
'Security::AutoFixWorker' => 3,
'Security::StoreScansWorker' => 3,
'SelfMonitoringProjectCreateWorker' => 3,
'SelfMonitoringProjectDeleteWorker' => 3,
'ServiceDeskEmailReceiverWorker' => 3,
'SetUserStatusBasedOnUserCapSettingWorker' => 3,
'SnippetScheduleBulkRepositoryShardMovesWorker' => 3,
'SnippetUpdateRepositoryStorageWorker' => 3,
'Snippets::ScheduleBulkRepositoryShardMovesWorker' => 3,
'Snippets::UpdateRepositoryStorageWorker' => 3,
'StageUpdateWorker' => 3,
'StatusPage::PublishWorker' => 5,
'StoreSecurityReportsWorker' => 3,
'StoreSecurityScansWorker' => 3,
'SyncSeatLinkRequestWorker' => 20,
'SyncSeatLinkWorker' => 12,
'SyncSecurityReportsToReportApprovalRulesWorker' => 3,
'SystemHookPushWorker' => 3,
'TodosDestroyer::ConfidentialEpicWorker' => 3,
'TodosDestroyer::ConfidentialIssueWorker' => 3,
'TodosDestroyer::DestroyedIssuableWorker' => 3,
'TodosDestroyer::EntityLeaveWorker' => 3,
'TodosDestroyer::GroupPrivateWorker' => 3,
'TodosDestroyer::PrivateFeaturesWorker' => 3,
'TodosDestroyer::ProjectPrivateWorker' => 3,
'UpdateExternalPullRequestsWorker' => 3,
'UpdateHeadPipelineForMergeRequestWorker' => 3,
'UpdateHighestRoleWorker' => 3,
'UpdateMergeRequestsWorker' => 3,
'UpdateProjectStatisticsWorker' => 3,
'UploadChecksumWorker' => 3,
'Vulnerabilities::Statistics::AdjustmentWorker' => 3,
'VulnerabilityExports::ExportDeletionWorker' => 3,
'VulnerabilityExports::ExportWorker' => 3,
'WaitForClusterCreationWorker' => 3,
'WebHookWorker' => 4,
'WebHooks::DestroyWorker' => 3,
'Wikis::GitGarbageCollectWorker' => false,
'X509CertificateRevokeWorker' => 3
}
end
it 'uses the default number of retries for new jobs' do
expect(workers_without_defaults - cronjobs - retry_exception_workers).to all(have_attributes(retries: true))
end
it 'uses zero retries for cronjobs' do
expect(cronjobs - retry_exception_workers).to all(have_attributes(retries: false))
end
it 'uses specified numbers of retries for workers with exceptions encoded here', :aggregate_failures do
retry_exception_workers.each do |worker|
expect(worker.retries).to eq(retry_exceptions[worker.klass.to_s]),
"#{worker.klass} has #{worker.retries} retries, expected #{retry_exceptions[worker.klass]}"
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment