Adds LoadOrErrorOrShow component
What does this MR do and why?
Adds LoadOrErrorOrShow component
Functionality to show or hide content depending on query result will be added into more places within model registry, we are extracting it into its own component. This doesn't change anything in the UI, it's a pure refactor
How to set up and validate locally
-
In rails console enable the experiment fully
Feature.enable(:model_registry)
-
Create a model and model_version:
p = Project.find_by(id: 1) model = Ml::FindOrCreateModelService.new(p, "gitlab_amazing_model").execute model_version = Ml::FindOrCreateModelVersionService.new(p, { model_name: "gitlab_amazing_model", version: "1.0.0" }).execute
-
Navigate to the project, select
Deploy > Model registry
and select the model you created. -
In the model detail, open the Model version list, it should show a model version as before. Candidate list should should show an empty state