Add automatic retry for notarization failures in SignTool#16508
Merged
Add automatic retry for notarization failures in SignTool#16508
Conversation
Co-authored-by: mmitche <[email protected]>
Co-authored-by: mmitche <[email protected]>
…er attempt Co-authored-by: mmitche <[email protected]>
Co-authored-by: mmitche <[email protected]>
Copilot
AI
changed the title
[WIP] Add automatic retry for notarization process in signtool
Add automatic retry for notarization failures in SignTool
Feb 5, 2026
mmitche
reviewed
Feb 5, 2026
Co-authored-by: mmitche <[email protected]>
akoeplinger
approved these changes
Feb 6, 2026
Member
|
/backport to release/10.0 |
Contributor
|
Started backporting to |
steveisok
added a commit
to steveisok/arcade
that referenced
this pull request
Apr 2, 2026
The notarization retry logic (added in dotnet#16508) correctly retries up to 5 times when Apple notarization fails transiently. However, when the out-of-process MSBuild invocation fails on attempt N, RealSignTool.RunMSBuild logs via _log.LogError(), which permanently records the error in MSBuild's error list. Even when a subsequent retry succeeds, the build fails with '1 Error(s)' from the earlier attempt. This was observed in 4+ internal unified-build failures where: - Notarization attempt 1 failed (transient Apple service issue) - Attempt 2 succeeded (package verified as 'trusted by Apple notary service') - Build still reported FAILED due to the error from attempt 1 The fix adds a SuppressRunMSBuildErrors flag that RealSignTool checks during retryable attempts. Failed attempts are logged as high-importance messages (still visible in logs for diagnostics) instead of errors. The last attempt uses normal error logging so exhausted retries are correctly reported. Fixes: macOS notarization builds failing despite successful retry Related: dotnet#16507, dotnet#16508, dotnet#15756 Co-authored-by: Copilot <[email protected]>
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.
Notarization experiences transient failures in bursts, causing all MacOS builds to fail for extended periods.
Changes
SignTool.cs - AuthenticodeSignAndNotarize()
NotarizationRound{X}-Attempt{Y}.binlogSignToolTests.cs
FakeBuildEngineWithFailureshelper for failure injectionThe retry loop only applies to the notarization pass, not authenticode signing.
To double check:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.