Remove AutoFixWorker class
Summary
A part of #435432 (closed)
This worker was never officially worked as its behind a disabled feature flag. We can't make sure that nobody enabled the flag on any self-hosted instance. We need to follow our deprecation policy for workers.
In the first part we removed usage of the worker and made it no-op. Now we can safely remove the worker class itself.
Implementation plan
- Delete AutoFixWorker class file and follow the guidance in our Sidekiq queues documentation around running Rake tasks to regenerate/update related files.
- Add a migration (not a post-deployment migration) that uses
sidekiq_remove_jobs
:
class RemoveAutoFixWorkersJobInstances < Gitlab::Database::Migration[2.1]
# Always use `disable_ddl_transaction!` while using the `sidekiq_remove_jobs` method, as we had multiple production incidents due to `idle-in-transaction` timeout.
disable_ddl_transaction!
def up
sidekiq_remove_jobs(job_klasses: ['Security::AutoFixWorker'])
end
def down
# This migration removes any instances of deprecated workers and cannot be undone.
end
end
Edited by Tetiana Chupryna