Fix error when CI entry artifacts:reports:coverage_report is set to null
What does this MR do and why?
Currently, a runner error occurs when you set a job's artifacts:reports:coverage_report
value to null
. It is supposed to run successfully as though the coverage_report
is not specified (i.e runs without producing an artifact report).
The issue is that the null
value is being converted into an empty array, resulting in a config that looks like {:coverage_report=>[]}
. This MR fixes this so that the null value is excluded from the conversion, resulting in a correct empty config {}
.
Screenshots or screen recordings
There are two problems here:
-
A minor error in the FE validation schema showing that
null
is an invalid value (when it should be valid).
How to set up and validate locally
- Go to your Project's CI/CD > Editor and add the following contents:
job:
stage: test
script:
- []
artifacts:
reports:
coverage_report: null
- Observe that the FE validation error no longer occurs on the
null
value.
- Commit the change and let the pipeline run. Observe that the job runs successfully without error.
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.
Related to #383079 (closed)