Skip to content

Removes hardcoded path to svg

Eduardo Bonet requested to merge mlops/fix-missing-image into master

What does this MR do and why?

Path to empty state was hardcoded, and is leading to 404 (eg https://gitlab.com/gitlab-org/gitlab/-/ml/experiments). This is being fixed by passing the image path from the backend.

How to set up and validate locally

Reproducing is weird since the old version still works in local branch, it only breaks in production. So at best we can test that it continues working:

  1. Enable the feature flag

    echo "Feature.enable(:ml_experiment_tracking)" | bundle exec rails c
  2. Go to a project, click on 'Package & Registries > Model Experiments'. Verify that the svg for the empty state is loading. image

  3. Create an experiment:

    user_id = 1 # if you are using root
    project_id = 20 # not necessarily 20, but the project you are using for testing
    exp = Ml::Experiment.create!(name: 'Gitlab Experiment', user_id: user_id, project_id: project_id)
  4. Refresh Model experiments page, and click on the experiment. Verify that the empty svg is loaded on this page as well image

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports