Pass attempt label to JUnit output to distinguish test retries#2209
Draft
michelle-clayton-work wants to merge 1 commit intomicrosoft/mainfrom
Draft
Pass attempt label to JUnit output to distinguish test retries#2209michelle-clayton-work wants to merge 1 commit intomicrosoft/mainfrom
michelle-clayton-work wants to merge 1 commit intomicrosoft/mainfrom
Conversation
dagood
reviewed
Mar 24, 2026
eng/pipeline/stages/run-stage.yml
Outdated
| -rawtestout '$(Build.SourcesDirectory)/eng/artifacts/RawTestOutput/raw-json-attempt-${{ attempt }}.txt' | ||
| -junitout '$(Build.SourcesDirectory)/eng/artifacts/RawTestOutput/TestResults-attempt-${{ attempt }}.xml' ` | ||
| -rawtestout '$(Build.SourcesDirectory)/eng/artifacts/RawTestOutput/raw-json-attempt-${{ attempt }}.txt' ` | ||
| -attempt '${{ attempt }}' |
Member
There was a problem hiding this comment.
Oh, I wasn't clear about what kind of attempts I meant in #2134... I was thinking about System.JobAttempt. But it actually makes sense to keep each parameters.retryAttempts result as well so that we can use it to track test flakiness in the future. So, I guess we should keep/fix both -attempt and (say) -jobattempt types of retry here.
bf0b715 to
4d6827e
Compare
Add -attempt and -jobattempt flags to run-builder, passed through to json2junit. This distinguishes test results along two retry dimensions: - System.JobAttempt (AzDO job-level rerun): passed as -jobattempt - retryAttempts loop (in-job test retry): passed as -attempt Each retry attempt writes a unique JUnit XML file (TestResults-attempt-N.xml) and publishes its own test run. The test run title includes both labels, e.g.: 'linux-amd64 test (ubuntu) (job attempt 2, retry 3)' Suite names inside the XML also include the labels: 'cmd/go [job attempt 2, retry 3]' Fixes: #2134
4d6827e to
ea7101d
Compare
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.
DONT MERGE YET
This ensures test result entries in AzDO distinguish which attempt they correspond to, both via unique file names and via the attempt label embedded in JUnit test suite names.
Fixes: #2134