A model version must be unique by hash
We cannot have multiple versions sharing the same hash:
- add a unique together on
ModelVersion
: model + hash - the endpoint
CreateModelVersion
must not allow to create a new version if a version with same hash exists on the model. If such a match exists, the endpoint must return 400 and different payloads:- an error when the match has
state == available
- the normal payload with s3_put_url otherwise (so we can recover uploads in case of system errors)
- an error when the match has