Error when using rules:exists with include
Summary
With #276515 (closed) and !67409 (merged), include:rules
was introduced. Only rules:if
is supported for now and you cannot use other rules in include
.
When you use, for example, rules:exits
, you get an Undefined error
.
Steps to reproduce
- Create a CI config with this;
include:
- local: configs/builds.yml
rules:
- exists:
- '$INCLUDE_BUILDS'
test:
stage: test
script: exit 0
- And try to see the config file on the file show page.
- And see the pipeline.
Example Project
https://gitlab.com/furkanayhan/test-project/-/pipelines/375096600
What is the current bug behavior?
- The pipeline shows an undefined error.
- The file show page returns 500.
What is the expected correct behavior?
- The pipeline should show a correct error message.
- The file show page should work properly.
Relevant logs and/or screenshots
Sentry errors: https://sentry.gitlab.net/gitlab/gitlabcom/?query=top_level_worktree_paths
Output of checks
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)