Enforce setting string as value of the CI/CD variable
What does this MR do?
Enforces Gitlab::Ci::Variables::Collection::Item#initialize
to accept only String
as value
.
Are there points in the code the reviewer needs to double check?
The pipeline for this MR will discover all places in tests and in application, where we're using a non-string variable value. I've already found some of them and updated, but we will need to update the rest before merging this (if there is anything else).
Why was this MR needed?
Runner requires that the value will be sent as JSON string
. Unfortunately we're not enforcing this when creating the variable, which finally may end with a stuck job that was assigned to the Runner, but Runner failed with Error decoding json payload json: cannot unmarshal number into Go struct field JobVariable.value of type string
.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a UX Designer -
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Fixes #48210 (closed)
Edited by Grzegorz Bizon