Skip to content

SEP jobs not enforced without project CI when pipeline is run via UI

Summary

When running pipeline manually via UI, SEP jobs are not enforced for projects without CI configuration.

Steps to reproduce

  1. Create a project
  2. Create a SEP to run on all branches
  3. Go to Pipelines -> Run

Example Project

What is the current bug behavior?

SEP jobs are not enforced properly.

What is the expected correct behavior?

SEP jobs should force the pipeline.

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

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

Add `async` arg to `PipelineCreate` mutation (!174577 - merged) changed the source that's passed into Ci::CreatePipelineService from a symbol to a string.

The check for valid_pipeline_source? doesn't account for strings and therefore returns false.

To fix it, we should always compare symbols.

Edited by Martin Cavoj