Skip to content

Optimize ListConfigVariablesService (prefill variables service)

Furkan Ayhan requested to merge 468827-optimize-ListConfigVariablesService into master

What does this MR do and why?

We recently added two changes to this service;

  1. 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)

  2. d273ad95 We started passing the ref name to YamlProcessor when fetching prefill variables. The reason was this; When using $CI_COMMIT_REF_NAME in include: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

Screenshot_2024-08-08_at_10.41.54

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.

Edited by Furkan Ayhan

Merge request reports

Loading