ci.json schema does not allow empty tags array
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
GitLab CI accepts a job configuration which sets an empty tag list, but the official schema does not allow it.
Steps to reproduce
-
Configure some default set of tags in
.gitlab-ci.yml
:default: tags: [my-tag]
-
Reset the tags in a job:
my-job: tags: [] script: 'true'
-
Push the configuration to GitLab
What is the current bug behavior?
The job runs fine in CI, but the configuration does not correspond to the schema:
❯ check-jsonschema --schemafile=https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json .gitlab-ci.yml
Schema validation errors were encountered.
.gitlab-ci.yml::$.my-job.tags: [] should be non-empty
What is the expected correct behavior?
The configuration works, and being able to override the tags when using default
s or extends
is useful, so the schema should allow it.
Output of checks
This bug happens on GitLab.com
Edited by 🤖 GitLab Bot 🤖