Updates Config::Entry::Variable value to support array
What does this MR do and why?
- Make
Config::Entry::Variable
value
support an array of values for a variable - Add
allow_array
metadata to thevariables
keyword inEntry::Root
to only allow top-level variables to have arrayvalue
s. - Update the
value
field forConfigVariableType
to support multiple values. Since GraphQL does not support scalar unions, we are going to support either an array of stings or a string wrapped in an array.
Screenshots or screen recordings
GraphQL:
query {
project(fullPath: "root/variables-test"){
ciConfigVariables(sha:"0dbda96f0c5a5979c80dd56325f2a85c4e92f349"){
description
key
value
}
}
}
{
"data": {
"project": {
"ciConfigVariables": [
{
"description": "The deployment target. Change this variable to 'canary' or 'production' if needed.",
"key": "DEPLOY_ENVIRONMENT",
"value": ["staging", "Production"]
}
]
}
}
}
NOTE: This work is backend support for frontend: !96542 (merged), which is under the run_pipeline_graphql
feature flag.
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 Laura Montemayor