fix(e2e): add gotestsum --rerun-fails to retry flaky e2e test failures#8308
Closed
hsubramanianaks wants to merge 1 commit intomainfrom
Closed
fix(e2e): add gotestsum --rerun-fails to retry flaky e2e test failures#8308hsubramanianaks wants to merge 1 commit intomainfrom
hsubramanianaks wants to merge 1 commit intomainfrom
Conversation
Add --rerun-fails=1 to the gotestsum command so that failed tests are automatically rerun once before reporting failure. This handles transient infrastructure issues like systemd bookkeeping races (e.g., cloud-init temp mount units entering failed state) without requiring a full pipeline re-run. Only failed tests are rerun, not the entire suite, so the cost is minimal. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a lightweight retry mechanism for flaky e2e Go tests by rerunning only failed tests once via gotestsum.
Changes:
- Adds gotestsum
--rerun-fails=1to rerun only failed e2e tests once - Documents the rationale for the retry behavior in the e2e runner script
Contributor
Author
|
Closing this one due to comments - #8300 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add automatic retry for failed e2e tests using gotestsum
--rerun-fails=1.Why
E2e tests have no retry mechanism today. When a transient infrastructure issue causes a single test to fail (e.g., a cloud-init temp mount entering failed systemd state), the entire pipeline fails and requires manual re-run.
The VHD build pipelines already have
retryCountOnTaskFailure: 3, but the e2e pipeline has nothing — no ADO-level retry and no Go-level retry.Example flaky failure (Build 160089239)
One test failed due to a transient
run-cloud\x2dinit-tmp-tmpde1rbvp9.mountsystemd unit entering failed state. All 159 other tests passed. A retry would have likely passed.Changes
--rerun-fails=1to the gotestsum command in.pipelines/scripts/e2e_run.shRisk
🟢 Low — gotestsum
--rerun-failsis a well-established feature. It only reruns failed tests, does not affect passing tests, and the JUnit report correctly reflects the final outcome.