Timeout pipeline triggered from MR due to ce:custom-parallel jobs

The ce:custom-parallel, CE quarantine, and Staging jobs are supposed to be manual, but they're being triggered by GitLab Bot. E.g., in this MR.

ce:custom-parallel jobs are intended to be used with env vars that customize the tests run, but if triggered without any vars they run Test::Instance::Image, which runs all tests, and that takes over an hour.

The problem seems to be that it's matching the wrong condition for the rules in .ce-qa

.ce-qa:
  variables:
    DEFAULT_RELEASE: "CE"
  rules:
    - if: '$CI_COMMIT_TAG'
      when: never
    - if: '$RELEASE == null && $CI_JOB_NAME =~ /quarantine|praefect|custom|staging/'
      when: manual
    - if: '$RELEASE =~ /gitlab-ce/ && $CI_JOB_NAME =~ /quarantine|praefect|custom|staging/'
      when: manual
    - if: '$CI_MERGE_REQUEST_ID && $CI_JOB_NAME =~ /quarantine|praefect|custom|staging/'
      when: manual
    - if: '$RELEASE == null || $RELEASE =~ /gitlab-ce/ || $CI_MERGE_REQUEST_ID || $CI_COMMIT_REF_NAME == "master"'

Looking at one of the jobs ce:instance-quarantine https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/443403985

  • RELEASE is registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee:f34a870c2fc7425151ff5958f160f099e6c1c24a

So it fails to meet the first condition with $RELEASE =~ /gitlab-ce/ that would have applied when: manual.

And because the default target ref for pipelines triggered by package-and-qa is master, it does meet the final condition that includes $CI_COMMIT_REF_NAME == "master", which implicitly applies when: on_success, and so the jobs run automatically.

Edited by Mark Lapierre