Draft: Optimize ListConfigVariablesService (prefill variables service) (retry)
What does this MR do and why?
Note: this is the second try because the last MR was reverted.
- Previous MR: !162055 (merged)
- Reverted: !162897 (merged)
We recently added two changes to this service;
-
cd811a5a We started passing verify_project_sha to YamlProcessor to check the passed ref to avoid malicious sha's. (the
ref
parameter accepts a commit SHA as a value) -
d273ad95 We started passing the ref name to YamlProcessor when fetching prefill variables. The reason was this; When using
$CI_COMMIT_REF_NAME
ininclude:rules
, the correct jobs but the wrong prefilled variables were included because$CI_COMMIT_REF_NAME
were not available.
For 1; we first check whether the passed ref
parameter is actually
a ref in the project. If so, we don't need to verify the calculated
sha
.
For 2; we don't have to use RefFinder
because we already have ref
.
Related to #468827
Expected result
I am expecting that the duration of Ci::ListConfigVariablesService
will be decreased.
https://log.gprd.gitlab.net/app/r/s/71r3H
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.