Cannot set a type:array input with a !reference
Summary
When setting an input as being a !reference, the interpolation gets weird, and the data being referenced is not available
Steps to reproduce
# catalog > templates/my_template.yml
spec:
description: sample component
inputs:
a:
type: array
---
job:
script:
- echo '$[[ inputs.a ]]' > my_script.sh# project > list.yml
.my-shared-list:
- value1
- value2# project > .gitlab-ci.yml
include:
- local: /list.yml
- components: path/to/catalog/my_template@~latest # even though ~latest is ugly
inputs:
a:
- !reference [.my-shared-list]
- my-specificWhat is the unexpected (buggy) behavior ?
The reference is detected and handled by GitLab, but never interpolated, as seen in the Full Configuration tab of the Pipeline Editor, where job has the following config:
job:
script:
- echo '[#<Gitlab::Ci::Config::Yaml::Tags::Reference:0xRAW_HEX_HERE @data={:tag=>"!reference", :style=>1, :seq=>[".my-shared-list"], :scalar=>nil, :map=>{}}>, my-specific]' > my_script.shWhat is the expected correct behavior?
I would expect the !reference to be interpolated as a valid array of what it means.
job:
script:
- echo '["value1", "value2", "my-specific"]' > my_script.shGitLab details
I am using GitLab 19.1.2, self managed
Edited by Alexandre-SCHOEPP