The source project of this merge request has been removed.
Extends variable expanding to maximum depth of 10
What does this MR do?
Currently variable are expanded only to next depth level. After this MR variables are expanded maximum depth 10.
Why was this MR needed?
- Variables are more usable: for example group and project variables can reference each other and be referenced from job or global variables. Actual example with basic authentication in test cases
- This fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38119
- Previous behaviour seems to be undocumented. https://docs.gitlab.com/ce/ci/variables/README.html#gitlab-ci-yml-defined-variables states that: "You are able to use other variables inside your variable definition (or escape them with $$)"
Are there points in the code the reviewer needs to double check?
- Maximum depth is defined for preventing stack overflow (variable expanding is directed graph so it is possible to have cyclic dependency).
- Should there be warning if maximum depth is met?
- Because old behaviour is not documented/is undefined, this change can break workflows
- Should there be configurable maximum and setting it to 1 (previous behaviour) for next release and rising default later
- Or should there be boolean flag to disable this feature if someone is depending on old behaviour
- Should Gitlab documentation be updated in different MR?
Does this MR meet the acceptance criteria?
-
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Branch has no merge conflicts with master
(if you do - rebase it please)
What are the relevant issue numbers?
Edited by Turo Soisenniemi