Skip to content

Scheduled pipelines don't return an error if the pipeline is empty

Summary

Manual pipeline runs correctly show the message "The resulting pipeline would have been empty. Review the rules configuration for the relevant jobs." but this message is missing when running empty scheduled pipelines manually.

Steps to reproduce

  1. Create a scheduled pipeline that would result in an empty pipeline (
first-job:
  image: alpine
  stage: .pre
  script:
    - echo "This job runs in the .pre stage, before all other stages."
second-job:
  image: alpine
  stage: .post
  script:
    - echo "This job runs in the .post stage, after all other stages."
  1. Manually trigger the scheduled pipeline from the GitLab UI
  2. Observe that no warning message is displayed about the empty pipeline. You get the following message:
Successfully scheduled a pipeline to run. Go to the Pipelines page for details.

What is the current bug behavior?

  • The page states a pipeline is created even though one is not created

What is the expected correct behavior?

  • We should get an error message similar to when manually running a pipeline

Relevant logs and/or screenshots

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)

Possible fixes

Patch release information for backports

If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.

Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.

High-severity bug remediation

To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.

Edited by 🤖 GitLab Bot 🤖