Parent pipeline status "pending" when child status is "waiting for manual action"
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
I couldn't find a bug ticket for this issue, could only find it described in a comment on a related but distinct issue here: #202239 (closed)
Summary
When a parent pipeline triggers a child pipeline, and that child pipeline has a manual step in it, when waiting for that manual step the parent pipeline displays the status "Pending" instead of "Waaiting for manual action".
Steps to reproduce
Make a project with the following files
.gitlab-ci.yaml:
trigger-child-pipeline:
trigger:
strategy: depend
include:
- local : child-pipeline-with-manual-step.yml
child-pipeline-with-manual-step.yml:
stages:
- first
- second
- third
auto-first-job:
stage: first
script:
- echo foo
manual-second-job:
stage: second
script:
- echo "manual job, can proceed after it's triggered"
when: manual
allow_failure: false
auto-third-job:
stage: third
script:
- echo bar
Push to gitlab, and observe the pipeline in UI under the CI/CD tab on the left.
Example Project
https://gitlab.com/alexhumphreys/test-child-pipeline-manual
What is the current bug behavior?
- The parent triggers the child pipeline
- The child pipeline gets to the manual stage and stops
- The status of the parent pipeline stays as "Pending"
What is the expected correct behavior?
It is using strategy: depend. I would expect the parent pipeline status to reflect the child pipeline status, so the parent status would be "waiting for manual action" instead of "pending".
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
From the discussions on #202239 (closed), it sounds like the child pipeline status is only reported at the end of the run of the child pipeline. Since the manual job stops it from reaching the end, the status never gets updated. Not sure about a line of code, but that behaviour probably needs to be changed to reflect other status. This comment here seems to suggest the same, but it's from a year ago and I can't see any issue/MR where it has been addressed.
