-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ci): Add retest workflow. Fixes #12864 #13000
Conversation
a4dd27f
to
7675c06
Compare
Would be good to detail where and what you tested. I know you were testing in miltalex#2 and miltalex#1 as I had been taking a look. It would be good to also add which scenarios you tested in a list. Can see my "Verification" section in #12006 as an example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the effort in testing this out and getting it working!
I left some comments below to optimize this a bit. Some token security settings also need adjustments
9d2ace5
to
d757689
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small nits, otherwise LGTM
Signed-off-by: Miltiadis Alexis <alexmiltiadis@gmail.com>
d757689
to
ca3ed5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, this should be really helpful whenever we have test flakes!
Hmm this seemed to have failed on my first try of it in #12732 (comment): https://github.com/argoproj/argo-workflows/actions/runs/8948441124/job/24581552898:
|
^That run might actually be too old and may have been GC'd on GH's side. I didn't have a button to rerun the failed jobs myself. We may want to add some error handling for a more clear error message in some scenarios |
Hmm failed on a more recent run in #12732 (comment) as well: https://github.com/argoproj/argo-workflows/actions/runs/8949025175/job/24582819712. Same error as above |
I will have a look to amend it |
Fixes #12864
Motivation
Due to flaky tests, it would be nice to allow
Members
to re-run failing workflows.Modifications
Extend github workflows with
retest.yaml
. It adds a new workflow run which is triggered onissue_comment:[created,edited]
. It requires the comment to contain exactly the/retest
. It will execute a sequence of API calls to fetch the latest SHA, the latest run ID and trigger the rerun of the failed jobs.Note: If the workflow doesn't contain any failed jobs it will fail.
Verification
Used a forked repository https://github.com/miltalex/argo-workflows . Merged the new workflow on
main
branch and opened PRs (miltalex#1 , miltalex#2 , miltalex#3) in order to:/retest
→ Trigger failed jobsretest
→ Retest workflow is skipped/retest
→ Trigger failed jobs/retest
→ Retest workflow is skipped/retest
and no failing jobs → Retest workflow failed due to no failing jobs.