GitLab CI pipelines with an automatic job chained on a manual job runs automatically instead of waiting for the manual job to successfully run first

Summary

When pipelines are kicked off that have a mix of automatic and manual jobs, with automatic jobs coming after manual ones, the pipeline still attempts to run the automatic jobs that are chained after the manual one, which leads to unexpected surprises.

Steps to reproduce

  1. Create a repo
  2. Set up a GitLab CI configuration with an automatic job dependent on a manual one

Example Project

See: https://gitlab.com/BuggedGroup/buggyrepo

Example pipeline: https://gitlab.com/BuggedGroup/buggyrepo/pipelines/35145893

GitLab CI configuration: https://gitlab.com/BuggedGroup/buggyrepo/blob/master/.gitlab-ci.yml

What is the current bug behavior?

The pipeline still attempts to run the automatic jobs that are chained after the manual one, which leads to unexpected surprises.

What is the expected correct behavior?

The jobs dependent on a manual job will not be invoked until the manual job successfully runs.

Relevant logs and/or screenshots

See logs in this pipeline: https://gitlab.com/BuggedGroup/buggyrepo/pipelines/35145893

Output of checks

This bug happens on GitLab.com.

Possible fixes

I'm not sure on what exactly causes this...