Skip to content

Update CI/CD catalog details page to use API data

Frédéric Caplette requested to merge fc-remove-catalog-details-page-mock into master

What does this MR do and why?

We now fetch most of the data for the CI/CD catalog details page through the API instead of using a client resolver. This requires som small tweaks in the component to use the new data structure and update tests. This is behind a disabled FF, ci_namespace_catalog_experimental

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-06-15_at_3.22.01_PM Screenshot_2023-06-15_at_2.00.10_PM

How to set up and validate locally

  1. Make sure you have an ultimate license for your GDK
  2. Enable the feature flag: ci_namespace_catalog_experimental
  3. Login as a user
  4. Create a few projects that you will be able to convert to Ci resources
  5. Once you have done so, get the ID of the first new project you wanted to convert. Then in Rails console, run:
projects = Project.where("id > ?", your_first_project_id)
projects.each do |project|
  project.update!(description: 'description')  
  ::Ci::Catalog::Resource.new(project_id: project.id).save   
end  
  1. Navigate to /$namespace/$project/-/ci/catalog/resources/1
  2. Notice that you get the correct information about your catalog resource, except the merge requests and issues count!

MR acceptance checklist

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

Edited by Frédéric Caplette

Merge request reports

Loading