Model registry: Add author to model and model version
What does this MR do and why?
This MR adds backend support for providing the author of model and model version which will be displayed in a new design.
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
- In the rails console create a model without a description
p = Project.find_by(name:"Flight")
Ml::CreateModelService.new(p, "model_1").execute
Ml::Model.find_by(name: "model_1").id
Or via GraphQL:
mutation {
mlModelCreate(input: {
name: "my-model-1234",
projectPath: "flightjs/Flight",
description: "hello world"
}) {
model{
id
descriptionHtml
}
errors
}
}
- Alternatively use GraphQL to verify
{
mlModel(id: "gid://gitlab/Ml::Model/9") {
id
author {
id
username
webUrl
avatarUrl
}
}
}
Numbered steps to set up and validate the change are strongly suggested.
Related to #499548 (closed)
Edited by Fred de Gier