Parent-child pipelines: Child job stuck in 'pending' state without a reason
Problem to solve
When setting up a Parent-child pipeline in the UI, child job(s) can get stuck in 'pending' state, without any obvious reason and without triggering the downstream pipeline/job.
The missing failure reason can cause frustration when setting up a new (or editing already existing) pipeline-chain.
Intended users
Further details
This behavior can be observed in both Self-managed (12.8.x) and GitLab.com.
Cases observed so far:
- When a child-job 'yml' file doesn't exist, (sample pipeline execution in GitLab.com)
- When there is a syntax error in the child-job 'yml' file (sample pipeline execution)
- When a downstream project is renamed or missing, the parent pipeline pends indefinitely (sample pipeline after downstream project path renamed)
Proposal
Expected behavior would be to notify the user, why the child job is stuck in pending, (similarly to when there are no runners available).
Expl.
- "The child pipeline file <PATH_TO_FILE> cannot be found."
- "There is a syntax error in the child-pipeline file <PATH_TO_FILE>"
- Another option would be to allow the user to validate particular '.yml' or '.yaml' file proactively. Button name in the UI could be e.g "CI/CD validate"
- "The downstream project is missing or was renamed."
Implementing such a notification/validation would improve user experience with the tool.
Permissions and Security
Whoever can set up a parent-child pipeline should be able to see the reason for a pending child job.
Documentation
https://docs.gitlab.com/ee/ci/parent_child_pipelines.html