diff options
Diffstat (limited to 'db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb')
-rw-r--r-- | db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb b/db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb new file mode 100644 index 00000000000..1bc80271ff7 --- /dev/null +++ b/db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class RemoveClustersApplicationsJobInstances < Gitlab::Database::Migration[2.0] + DEPRECATED_JOB_CLASSES = %w[ + ClusterConfigureIstioWorker + ClusterInstallAppWorker + ClusterPatchAppWorker + ClusterUpdateAppWorker + ClusterUpgradeAppWorker + ClusterWaitForAppInstallationWorker + ClusterWaitForAppUpdateWorker + ClusterWaitForIngressIpAddressWorker + ] + + def up + sidekiq_remove_jobs(job_klasses: DEPRECATED_JOB_CLASSES) + end + + def down + # no-op Why: This migration removes any instances of deprecated job classes + # from expected queues via the sidekiq_queue_length method. Once the job + # class instances are removed, they cannot be added back. These job classes + # are deprecated and previous MRs have already no-op'd their perform + # methods to further increase confidence that removal is OK. + end +end |