[Abandoned] Add selective test retry for E2E/integration tests#5355
Closed
[Abandoned] Add selective test retry for E2E/integration tests#5355
Conversation
- Add Invoke-TestWithRetry.ps1 script that retries only failed tests - Update e2e-tests.yml to use retry script instead of retryCountOnTaskFailure - Remove retryCountOnTaskFailure from integration and export test tasks - Keep infrastructure task retries unchanged Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
… script - Add comprehensive README.md for test retry scripts - Fix Invoke-TestWithRetry.ps1 to properly inherit environment variables - Use & operator instead of Start-Process for better env var handling Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
- Add escaping for pipe characters in test names - Add comment about special character handling - Improve robustness of filter building Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
- Create VALIDATION.md with detailed validation steps - Include expected outcomes for success, retry, and failure scenarios - Add troubleshooting guide for common issues - Provide clear sign-off checklist Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate adding job-level retries for E2E tests
Replace task-level test retry with selective failed-test retry
Jan 28, 2026
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
- Update run-cosmos-tests.yml to use Invoke-TestWithRetry.ps1 - Update run-sql-tests.yml to use Invoke-TestWithRetry.ps1 - Replace DotNetCoreCLI@2 with PowerShell@2 + PublishTestResults@2 - Maintain code coverage collection via AdditionalArgs - Update README.md with integration test usage example - Ensure environment variables are properly passed Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
- Add comprehensive validation steps for integration tests - Include code coverage validation checks - Add integration test retry examples to expected outcomes - Update checklist to cover both E2E and integration scenarios Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
Copilot
AI
changed the title
Replace task-level test retry with selective failed-test retry
Add selective test retry to E2E and integration tests
Jan 28, 2026
- Delete README.md (moved content to script comments) - Delete VALIDATION.md (validation complete) - Enhanced Invoke-TestWithRetry.ps1 with comprehensive inline documentation: - Added WHERE IT'S USED section - Added BENEFITS OVER retryCountOnTaskFailure section - Added HOW IT WORKS section - Added CODE COVERAGE SUPPORT section - Added E2E and Integration test examples - Added notes about PublishTestResults@2 usage - All necessary documentation now in PowerShell script for maintainability Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
Copilot
AI
changed the title
Add selective test retry to E2E and integration tests
Consolidate test retry documentation into PowerShell script
Jan 28, 2026
Copilot stopped work on behalf of
mikaelweave due to an error
January 28, 2026 20:41
- Add AllowPtrToDetectTestRunRetryFiles: true to build-variables.yml - This enables Azure DevOps to detect retry attempts from multiple TRX files - Tests that fail initially but pass on retry now show as "Passed with Retry" - Update PowerShell script comments to document this feature - Reference: https://devblogs.microsoft.com/dotnet/microsoft-testing-platform-azure-retry/ Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
Copilot
AI
changed the title
Consolidate test retry documentation into PowerShell script
Enable retry-aware test publishing in Azure DevOps
Jan 28, 2026
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
… refine test filtering
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…or testing purposes
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…ed file resolution
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…rt wildcard patterns with recursive search
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-Authored-By: Warp <agent@warp.dev>
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jestradaMS
reviewed
Feb 3, 2026
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Export E2E ${{ parameters.version }} CosmosDB' | ||
| retryCountOnTaskFailure: 1 |
Contributor
There was a problem hiding this comment.
Was there a reason we removed retry logic here, but did not update to use the Invoke-TestWithRetry.ps1 vs. continuing to u se DotNetCoreCli?
Contributor
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
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.
Description
Implements a selective test retry mechanism that only retries failed tests instead of rerunning the entire test suite. This replaces the
retryCountOnTaskFailureapproach which caused pipeline timeouts and poor test result visibility.AB#182243
Pipelines
Example of failing pipeline: https://microsofthealthoss.visualstudio.com/FhirServer/_build/results?buildId=47394&view=results
Example of working pipeline attached to this PR.
Changes
New PowerShell test retry script (
build/scripts/Invoke-TestWithRetry.ps1):--filterexpressionsAdditionalArgsparameterAzure DevOps pipeline updates:
AllowPtrToDetectTestRunRetryFiles: truevariable to enable retry-aware test result publishinge2e-tests.yml), SQL integration tests (run-sql-tests.yml), and Cosmos integration tests (run-cosmos-tests.yml) to use the new retry scriptPublishTestResults@2tasks for proper TRX file publishing*/coverage.cobertura.xmlto**/coverage.cobertura.xmlRemoved
retryCountOnTaskFailure:Benefits
Related issues
Addresses pipeline timeout and test result visibility issues with E2E and integration tests.
Testing
FHIR Team Checklist
Semver Change (docs)
Skip (build infrastructure only)