Skip to content

Backend: create table `catalog_verified_namespaces`

Summary

In order to for frontend to implement sorting by verified author components in #432272 (closed), this issue is necessary to support that sorting from a backend perspective.

Proposal

We should assign a verification_level to a namespace so that we can cascade the correct catalog_resources.verification_level badge when a new catalog resource is created.

We need to create a table: catalog_verified_namespaces with namespace_id, verification_level, created_at. After this is done, we can use a data migration for SaaS only that adds the components namespaces as verification_level: :gitlab_maintained. The issue for the migration is here: #439392 (closed)

Confirm purpose and User Reception (how does this benefit the user?)

Users will be able to sort in the catalog to find verified authors in their searches.

Additional details

Some relevant technical details, if applicable, such as:

  • Does this need a feature flag?
  • Does there need to be an associated instrumentation issue created related to this work?
  • Is there an example response showing the data structure that should be returned (new endpoints only)?
  • What permissions should be used?
  • Is this EE or CE?
    • EE
    • CE
  • Additional comments:

Implementation Table

Issue title Link Relation/Notes
Backend: Add verification_level database field to catalog_resource_components table #434053 (closed) Blocks all
Backend: Expose field in GraphQL #434059 (closed) in parallel
Backend: create table catalog_verified_namespaces This issue Blocks #432272 (closed) #433299 (closed)
Filter components by badges #432272 (closed) Blocked by #439390 (closed)
Backend: Implement search algorithm for recommended TBD

Links/References

Edited by Mark Nuzzo