Skip to content

Add verified namespace service

What does this MR do and why?

Adding a Verification namespace service. Once run by a Gitlab team member, it will add a verification level to all the catalog resources in the group tree.

Addressing issue #451507 (closed)

Once the service is run, it can return the below errors: Errors: Must be a root namespace Screenshot_2024-04-23_at_17.14.17 Errors: Must be a valid verification level Screenshot_2024-04-25_at_12.05.59 When both above errors are raised: Screenshot_2024-04-23_at_17.13.50

I have posted about the missing icon for Verified Creator Maintained. The frontend is not showing this verification level atm as we are still working out the process behind awarding such badge.

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

Gitlab Maintained

Ci::Catalog::VerifyNamespaceService.new(group,'gitlab_maintained').execute

Screenshot_2024-04-18_at_15.22.58 I had 5 projects in a 3 level tree under a group (3 catalog resources that were released and those all show with the badge, one unreleased and one non catalog resource). Screenshot_2024-04-18_at_15.35.52

Gitlab Partner Maintained

Ci::Catalog::VerifyNamespaceService.new(group,'gitlab_partner_maintained').execute

Screenshot_2024-04-18_at_15.42.39 Screenshot_2024-04-18_at_15.42.47 Screenshot_2024-04-18_at_15.42.57 The link in the popover takes us to this page https://docs.gitlab.com/ee/ci/components/index.html#verified-components\

Verified Creator Maintained Verified Creator Maintained: also does not have an icon atm. I believe this file needs to be updated to add the icon for Verified Creator Maintained.

Ci::Catalog::VerifyNamespaceService.new(group,'verified_creator_maintained').execute

Screenshot_2024-04-18_at_15.47.25 Screenshot_2024-04-18_at_15.47.32

The catalog resource is updated with the correct verification level: Screenshot_2024-04-18_at_15.58.53

Unverified No icon.

Ci::Catalog::VerifyNamespaceService.new(group,'unverified').execute

Screenshot_2024-04-18_at_15.47.25 Screenshot_2024-04-18_at_15.47.32

How to set up and validate locally

  1. Select a group with subgroups that has projects with catalog resources. group = Group.find(186)
  2. Open console and run the Ci::Catalog::VerifyNamespaceService service. Please note the allowed verification_level is 'gitlab_maintained', 'gitlab_partner_maintained', 'verified_creator_maintained' or 'unverified'. Ci::Catalog::VerifyNamespaceService.new(group, verification_level).execute
  3. Check if catalog resources verification_level got updated: Ci::Catalog::Resource.where(project_id: group.all_projects.pluck(:id))
  4. Check a new record for Verified Namespace was created: Ci::Catalog::VerifiedNamespace.all
  5. You can also check in the UI.
    eg http://127.0.0.1:3000/explore/catalog/test-private-group-18.04/private-project-test-18.04
    <local_host>/explore/catalog/<project full path> to see the catalog resource details page.
    <local_host>/explore/catalog to see the ci catalog page.
Edited by Kasia Misirli

Merge request reports

Loading