Open dncohen opened 1 year ago
Hi @dncohen, thanks a lot for this PR. We announced that this project is officially adopted by GitLab https://github.com/profclems/glab/issues/983#issue-1175723125. All new contributions should be mode to the GitLab repo: https://gitlab.com/gitlab-org/cli
This PR has been automatically marked as stale because it has not had recent activity. This message is just a reminder for the author, reviewers and assignees.
Description
Before this PR,
glab ci retry <jobid>
would retry exactly one job, specified by job id.With this PR
glab ci retry
will retry the latest pipeline on the current branch, if it finds jobs have failed.Also,
glab ci retry --follow
will continue to monitor pipelines on the current branch. If jobs fail, it will trigger a pipeline retry. It will do this until interrupted.There are some baked-in values which ideally would be configurable. For example, it retries any one pipeline up to 3 times (then gives up). And, it polls for new pipelines every 30 minutes.
How Has This Been Tested?
My motivation is to provide a "band-aid" for code which has a number of flaky tests. They cause pipelines to fail, but often a retry will work. Because it may take some time to address the underlying flaky tests, this is a workaround that should help more pipelines fail.
So, I've tested this a little bit in the scope of that project.
Types of changes