When a pipeline fails, manual build & deploy jobs are cancelled even if not triggered by anyone
Summary
When a Pipeline with Test -> Build (manual) -> Deploy runs and Test fails, deploy jobs is created and marked as cancelled even if not manually triggered by anyone
Steps to reproduce
Create any pipeline with TEST -> BUILD MANUAL -> DEPLOY (auto or manual with environment) and launch it.
Example Project
Failed job: https://gitlab.com/probfacile/pipeline-environment-cancelled/-/jobs/366874653
Tree: https://gitlab.com/probfacile/pipeline-environment-cancelled/tree/master
Cancelled Deployment https://gitlab.com/probfacile/pipeline-environment-cancelled/environments/1237859
What is the current bug behavior?
IF you have a test successfull you don't get a deploy in environments until you launch manual steps. If you fail tests, you will find a deploy cancelled. This bug also triggers a cancelled deployment hook for whatever is attached to it. For example you see on slack a message stating deploy cancelled but you cannot filter it in webhooks.
What is the expected correct behavior?
If you fail tests, you don't get a deploy cancelled.
Output of checks
This bug happens on GitLab.com