Do not destroy empty ML model packages in cleanup worker
What does this MR do and why?
Do not destroy empty ML model packages
This change prevents ML model versions being left without a package
Related to #461322 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
N/A
How to set up and validate locally
- Go to any project
- Go to Deploy/Model Registry
- Create a model
FooGPT1, with a version1.0.0and some files. - Delete all the files
At some point package file cleanup worker will delete empty packages, when files are deleted. You can simulate on rails console:
bin/rails c
Packages::CleanupPackageFileWorker.perform_sync
You can run the worker multiple times.