Store full include path for CI components
What does this MR do and why?
The path
field on the ci_components
table currently holds the file path of the component within the component project repository. However, we aren't using that data. Instead, we need ComponentType
to provide the include path for the component so we can display it on the catalog resource details page. This MR stores the include path instead of the file path, and updates the path
field on ComponentType
to be named include_path
Existing component records will still have the file path stored. We'll decide later whether it is necessary to update them with a data migration.
How to set up and validate locally
- Create a new version of any catalog resource
- Fetch any component created from the new version
- See that the
path
field contains a full include path for the component -HOST/PROJECT_FULL_PATH/COMPONENT_NAME@VERSION
- Make a GraphQL query for the component:
query getCiCatalogResourceDetails {
ciCatalogResource(id: "RESOURCE-GID") {
latestVersion {
components {
nodes {
includePath
}
}
}
}
}
- See that you get the same include path in the return
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #433515 (closed)