Skip to content

Add backend support for markdown in ML Model Versions

What does this MR do and why?

Add backend support for markdown in ML Model Versions

Changelog: added

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

  1. Go to GDK
  2. Enable the Model registry feature if it's not yet enabled Feature.enable("model_registry")
  3. In the rails console create a model without a description
p = Project.find_by(name:"Flight")
Ml::CreateModelService.new(p, "modelz_1").execute 
Ml::Model.find_by(name: "modelz_1").id
  1. Use GraphQL to create a version
mutation {
  mlModelVersionCreate(input: { 
    projectPath: "flightjs/Flight", 
    modelId: "gid://gitlab/Ml::Model/4",
    description: "hello world"
  }) {
    modelVersion{
      version
      id
      descriptionHtml
    }
    errors
  }
}
  1. Verify in the output that the field descriptionHtml contains <p data-sourcepos=\"1:1-1:11\" dir=\"auto\">hello world</p>
  2. Verify the model exists with a version and a version description (not markdown) (replace the ID): http://127.0.0.1:3000/flightjs/Flight/-/ml/models/4/versions/4#/

Numbered steps to set up and validate the change are strongly suggested.

Related to #478475

Edited by Fred de Gier

Merge request reports