Remove package metadata sync worker
Problem to solve
PackageMetadata::SyncWorker
functionality was extracted and generalized as part of Add worker to trigger package metadata advisory... (#370780 - closed). But the worker itself could not be removed because of behaviour during releases (i.e. job being enqueued but the worker class no longer existed). Therefore a 2 step process must be followed as outlined here: https://docs.gitlab.com/ee/development/sidekiq/compatibility_across_updates.html#removing-worker-classes
Proposal
According to the docs, 2 steps are needed to remove a worker:
- Make the worker's
#perform
method a noop. - Remove the worker class and remove the job from the sidekiq queue.
Step 1 was done in Add worker to trigger package metadata advisory... (#370780 - closed).
Step 2 will be done in this issue.
Implementation plan
-
remove PackageMetadata::Syncworker
-
regenerate queues bin/rake gitlab:sidekiq:all_queues_yml:generate
-
add migration to remove job from the sidekiq queue
Edited by Igor Frenkel