Report any cyclic dep error when seeding build
What does this MR do?
This is the seventh MR in a Russian-doll style chain of 8 MRs culminating with !48627 (merged). It:
- Leverages
Ci::Build#variables(which now returns aCollection) to add logic inPipeline::Seed::Buildto create an error if an error is detected in the sorting of variables.
NOTE: There's a follow-up MR at the end of the MR chain that provides an alternative approach to this MR's introduction of Ci::Build#variable_collection. This could be backported to this MR, if we feel that it's the best approach. An example of that backport is available in this MR: !54682 (closed)
List of MRs
MR 1: MakeCollection::Sortedclass take and output aVariables::Collection;MR 2: Add#sorted_collectionmethod and#errorsproperty toVariables::Collection;MR 3: Add indexing/lookup of variables toVariables::Collection;-
MR 4: Add support for
depends_onproperty toVariables::Collection::Item; -
MR 5: Add support for
rawproperty toVariables::Collection::Item; -
MR 6: Add an
#expand_variables_collectionfunction toExpandVariablesto perform a full expansion of aVariables::Collection, gated by the new project-scoped:variable_inside_variablefeature flag. It will return the original object if a cyclic reference is detected; - MR 7: Add error reporting to
Gitlab::Ci::Pipeline::Seed::Buildto let the user know when a problem occurs with variable expansion; -
MR 8: Change
Ci::BuildRunnerPresenter#variablesto leverageExpandVariables#expand_variables_collectionso that variables sent in the job response are expanded;
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec -
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Part of gitlab-runner#26345 (closed)
Edited by Pedro Pombeiro