Backend: Construct component path from parts (stop fetching it from the database)
Problem
Currently, we save the full path ( gitlab.com/group/project/component-name@version
) to use a CI component in the path
field of catalog_resource_components
. We then pass that path to the frontend as the include_path
field on the CiCatalogResourceComponent
GraphQL type.
However, now that catalog resources can be moved, it's easy for the value in the database to get out of date. We need a solution that still works when a catalog resource project is moved.
Proposed solution
- Add an
include_path
method to theComponent
model that builds the path - Update the GraphQL
include_path
field to use that method - Update
Ci::Catalog::Resources::Versions::CreateService
to stop populating thepath
field - Remove the
path
field from the database since it will no longer be used
The last dot point from the above list
Edited by Kasia Misirli