Backend: Pipeline boolean and number include input types are not preserved downstream
Summary
When pipeline A includes pipeline B, which provides an input of either boolean or number type, and then pipeline B includes pipeline C with the same inputs, the type information is lost.
Steps to reproduce
See example project.
Example Project
.gitlab-ci.yml:
include:
- local: '/B.yml'
inputs:
XXX: 1
B.yml:
spec:
inputs:
XXX:
type: number
---
include:
- local: '/C.yml'
inputs:
XXX: $[[ inputs.XXX ]]
C.yml:
spec:
inputs:
XXX:
type: number
---
Test:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/alpine
stage: build
rules:
when: always
script:
- echo $[[ inputs.XXX ]]
What is the current bug behavior?
The GitLab fails to create the pipeline with the following message:
C.yml: XXX input: provided value is not a number
(or C.yml: XXX input: provided value is not a boolean
)
What is the expected correct behavior?
The pipeline should be created normally.
Relevant logs and/or screenshots
Output of checks
Using gitlab.com
with internally hosted runners.
Expand for gitlab runner version output
gitlab-runner-fb57775f5-tjlc8:/$ gitlab-runner --version Version: 16.6.1 Git revision: f5da3c5a Git branch: 16-6-stable GO version: go1.20.10 Built: 2023-11-24T21:11:36+0000 OS/Arch: linux/amd64
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:env:info\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:check SANITIZE=true\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\`) (we will only investigate if the tests are passing)