Delete parent/child pipelines
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=39503) </details> <!--IssueSummary end--> # Problem Follow up issue from https://gitlab.com/gitlab-org/gitlab/merge_requests/21365#note_257876879 Currently, we don't have a way to delete child pipelines. When a parent pipeline is deleted via the UI/API it's children are orphaned. To avoid orphaned children: * When deleting the parent pipeline we should also delete the child pipelines (this issue) Follow-up: * A non-orphaned child pipeline cannot be directly deleted (deletion must be triggered through the parent) https://gitlab.com/gitlab-org/gitlab/-/issues/457562 # Workaround The workaround to delete orphaned children via the api by finding them via `source` MR: !149839 # Proposal As we did for https://gitlab.com/gitlab-org/gitlab/-/issues/273378+ we can iterate through all child pipelines (including nested ones) and kick off an async deletion for each child pipeline.
issue