Make Catalog resource load by fullPath
What does this MR do and why?
Addressing issue.
We want Resource Resolver to use Ci::Catalog::Listing
to search for a catalog resource as Ci::Catalog::Listing
is our catalog resource search service and only returns published records. Before this MR, also draft catalog resources could be found and returned which is not the currently expected behaviour.
Screenshots or screen recordings
How to set up and validate locally
- Checkout this branch and via graphQL interface run below queries for published catalog resources:
Data is returned via both id and full_path
query getCiCatalogResourceDetails {
ciCatalogResource(id: "gid://gitlab/Ci::Catalog::Resource/12") {
id
webPath
openIssuesCount
openMergeRequestsCount
}
}
query getCiCatalogResourceDetails {
ciCatalogResource(fullPath: "root/component") {
id
webPath
openIssuesCount
openMergeRequestsCount
}
}
-
Run the same query for a draft component:
Error is returned. -
Checkout master and try to access the draft component
On master it is still possible to retrive the draft component data.
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.
Edited by Kasia Misirli