Backend: Retry subsequent jobs if upstream job is retried
Description
Currently, if someone retries a job, it is retried in isolation. If subsequent jobs depend on the results of that retried job, say via an artifact or image in the container registry, we should automatically retry all dependent jobs. Comments elsewhere have suggested that we want an option to specify which jobs should be retried or not, but I posit that we already have this declaration via artifacts. Unfortunately, artifacts don't encompass image dependencies yet. Perhaps we could augment dependencies to understand images and tags.
Also, by clever use of manual actions and when: always
, perhaps triggering manual actions could automatically cause reruns of subsequent (already run) jobs to pick up new changes generated by the manual action, such as a new Docker image.
Proposal
Links / references
- Related: https://gitlab.com/gitlab-org/gitlab-ce/issues/26360
- Mentioned in https://gitlab.com/gitlab-org/gitlab-ce/issues/20342#note_15889159 and https://gitlab.com/gitlab-org/gitlab-ce/issues/20342#note_20221907
/cc @grzesiek