Draft: Creating ModelVersion also creates Package
requested to merge 428905-ui-model-version-detail-see-details-about-a-model-version-backend into master
What does this MR do and why?
Creating ModelVersion also creates Package
Beforehand the package was only created when a model version was created through the ml_model package endpoint, which would cause model versions created in other places to be inconsistent. While a nil value for package should be allowed (deleted in cleanup job for example), at creation time it should always be available.
How to set up and validate locally
-
Create a model version with the service
project = Project.find_by(id: 1) user = User.find_by(id: 1) params = {user: user, model_name: 'blah', version: '1.2.3'} mv = Ml::FindOrCreateModelVersionService.new(project, params).execute
-
Verify that a package was created:
mv.package
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #428905 (closed)