Skip to content

Remove the deprecated DeleteContainerRepositoryWorker

🚜 Context

Related to : #388645 (closed)

Deleting a container repository is a quite complex operation. As such, it's handled by a background job. See !101946 (merged) for way more details.

The current background job present several reliability issues as listed in #217702 (closed).

We decided to switched the background job implementation to a limited capacity one since it can cope with issues, hiccups easily.

This switch was gated by a feature flag. Rollout issue: #378818 (closed).

In !106563 (merged), we cleanup the feature flag and started the removal process for the old background worker class. This was in %15.7.

This MR finishes the removal process. See this step in the documentation.

🔍 What does this MR do and why?

  • Removes the DeleteContainerRepositoryWorker class.
  • Adds a migration to remove any queued job instance.

📺 Screenshots or screen recordings

None

How to set up and validate locally

See !101946 (merged)

🚥 MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

💾 Database review

Migration up

$ rails db:migrate
main: == [advisory_lock_connection] object_id: 224520, pg_backend_pid: 11944
main: == 20230925095300 RemoveDeprecatedDeleteContainerRepositoryWorkerJobInstances: migrating 
main: -- transaction_open?(nil)
main:    -> 0.0000s
main: == 20230925095300 RemoveDeprecatedDeleteContainerRepositoryWorkerJobInstances: migrated (0.0035s) 

main: == [advisory_lock_connection] object_id: 224520, pg_backend_pid: 11944

Migration down

$ rails db:rollback
main: == [advisory_lock_connection] object_id: 224360, pg_backend_pid: 11658
main: == 20230925095300 RemoveDeprecatedDeleteContainerRepositoryWorkerJobInstances: reverting 
main: == 20230925095300 RemoveDeprecatedDeleteContainerRepositoryWorkerJobInstances: reverted (0.0062s) 
Edited by David Fernandez

Merge request reports