Test: retry MddBootstrapInitialize on transient State Repository error (AB#62489699)#6596
Open
v-arlysenko wants to merge 2 commits into
Open
Conversation
…ndency error (AB#62489699) The Test_x86_Windows.10.Professional.22H2_releasex86 stage in the Foundation PR pipeline intermittently fails in TAEF ClassSetup with MddBootstrapInitialize returning STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED (0x80670016). On slow/loaded agents the State Repository can still be indexing the just-installed DDLM package when the bootstrapper enumerates it; the same SHA passes on retry, confirming a transient race rather than a product regression. SetupBootstrapWithVersion now retries MddBootstrapInitialize with a bounded backoff (up to 10 attempts, 300ms apart) only when it returns 0x80670016. Any other HRESULT is verified immediately and is not masked.
…scription (AB#62489699)
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Problem
The Test_x86_Windows.10.Professional.22H2_releasex86 stage in the Foundation PR pipeline intermittently fails in TAEF ClassSetup with MddBootstrapInitialize returning STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED (0x80670016). The same SHA passes on retry, and only this one x86 Win10 22H2 stage is affected, pointing to a transient timing race rather than a product regression.
Root cause
SetupPackages installs the DDLM package via AddPackageAsync().get() (which completes), then immediately calls MddBootstrapInitialize. On a slow/loaded agent the State Repository can still be indexing the just-registered DDLM package when the bootstrapper enumerates it, so no fitting DDLM is found and it throws STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED. This clears on its own once indexing catches up.
Fix
SetupBootstrapWithVersion now retries MddBootstrapInitialize with a bounded backoff (up to 10 total attempts, 300ms apart) only when it returns 0x80670016. Any other HRESULT is verified immediately via VERIFY_SUCCEEDED and is not masked. Test-harness-only change; no product bootstrap code is touched.