Skip to content

Fix Helix test result upload retries - #4

Open
mmitche wants to merge 1584 commits into
mainfrom
copilot/helix-upload-retries
Open

Fix Helix test result upload retries#4
mmitche wants to merge 1584 commits into
mainfrom
copilot/helix-upload-retries

Conversation

@mmitche

@mmitche mmitche commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary\n\n- Retry transient Azure DevOps test-result upload transport failures and 5xx/429 responses.\n- Use Arcade Common retry results to combine exponential backoff with Retry-After without double delays.\n- Enable retries for test-result writes and dispose non-success responses safely.\n\n## Validation\n\n- dotnet test .\src\Microsoft.DotNet.Helix\Sdk.Tests\Microsoft.DotNet.Helix.Sdk.Tests\Microsoft.DotNet.Helix.Sdk.Tests.csproj --no-restore\n- 192 passed

Copilot AI and others added 30 commits June 3, 2026 15:18
… and remove log emojis (dotnet#16952)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Premek Vysoky <premek.vysoky@microsoft.com>
dotnet#16963)

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
[main] Update dependencies from dotnet/arcade
[main] Source code updates from dotnet/dotnet
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…etSources.sh on Unix (dotnet#16953)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Matt Mitchell <mmitche@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ain refactor merge (dotnet#16973)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Michael Simons <msimons@microsoft.com>
Signed-off-by: dependabot[bot] <support@github.com>
….2.3

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: ViktorHofer <ViktorHofer@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…40454 (dotnet#16987)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…, dotnet/dnceng (dotnet#16974)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <7412651+ViktorHofer@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
xUnit v3 with the Microsoft.Testing.Platform runner (default for v3) uses the exact same self-hosting 'dotnet exec ... <assembly>.dll' execution model as MSTest 4.x, NUnit-MTP, TUnit, and any other MTP-based test framework. The only difference between the previous XUnitV3Project Helix item type and the proposed MTPProject was the reporter args. This commit drops the duplication by:

* Renaming the item type XUnitV3Project to MTPProject, the task CreateXUnitV3WorkItems to CreateMTPWorkItems, and the folder/files xunitv3-runner -> mtp-runner / XUnitV3Runner -> MTPRunner.
* Dropping the UseMicrosoftTestingPlatformRunner switch and the legacy '-xml/-noAutoReporters' code path. MTP is now the only supported execution mode for this Helix item type; users on legacy non-MTP runners hand-author <HelixWorkItem>.
* Switching the generated reporter args to TRX ('--report-trx --report-trx-filename testResults.trx'), which is cross-framework and parsed natively by arcade's TRXFormat reporter. Microsoft.Testing.Extensions.TrxReport is required; MSTest.Sdk references it transitively and arcade's XUnitV3 SDK targets reference it implicitly under MTP mode.
* Adding MSTestProject as a discoverability shim that folds into MTPProject before any other target runs.

Migration: the only external in-tree consumer is dotnet/efcore's eng/helix.proj, which can rename '<XUnitV3Project ... />' to '<MTPProject ... />' as part of its next arcade SDK bump. Arcade's own tests/UnitTests.proj is updated in this commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On reflection the alias is asymmetric: we do not ship XUnitV3Project, NUnitProject, or TUnitProject aliases either. Singling out MSTest invites the false impression that MSTestProject does something MSTest-specific. The MSTest case is still called out explicitly in the supported-frameworks list of the Readme and SendingJobsToHelix doc, so discoverability via doc search is preserved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dotnet-maestro Bot and others added 30 commits July 30, 2026 08:29
[main] Source code updates from dotnet/dotnet
[main] Update dependencies from dotnet/arcade
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e5db9021-5257-4cf5-83ba-486a3e398391
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a2aa4598-efc5-44f4-a67b-7db19982252d
Copilot-Session: f12710df-91d5-49e4-b327-337932478b0b
…utsOutputsForPack (dotnet#17227)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Youssef Fahmy <youssefvictor00@gmail.com>
…#17168)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f118977e-1e71-40b0-8045-10f5ab006715
Co-authored-by: Pavel Purma <pavelpurma@microsoft.com>
…tnet#17218)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…17224)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0b8e67d1-91bc-4a47-a405-45549fe22d6f
Replace remaining call sites with ExponentialRetry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Preserve bool retry-handler overloads and retain the 429 backoff fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Keep the retry handler contract change as-is for this PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Pass attempt counts directly to ExponentialRetry and preserve final retry errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Make ExponentialRetry check and propagate cancellation around attempts and backoff delays.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Azure DevOps result publisher writes now always use the configured retry policy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Let ExponentialRetry perform cancellation checks while preventing callbacks from retrying cancellation exceptions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Test-result upload retries are not user-facing behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Stop before the final backoff and preserve the last failure without callback-level attempt checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Bound exponential backoff at 30 seconds while continuing to honor longer Retry-After guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Treat TaskCanceledException as transient unless the caller cancellation token was requested.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Accept possible duplicate results or attachments while keeping run lifecycle writes single-attempt.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Retry OperationCanceledException only when it wraps TimeoutException and caller cancellation was not requested.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b0d769e-fb8b-4a7e-985d-e7f4bb3c7356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.