Skip to content

Retry to delete WSL distribution shortcut for up to 10 seconds - #41046

Merged
Blue (OneBlue) merged 1 commit into
masterfrom
user/oneblue/shortcut-delete
Jul 10, 2026
Merged

Retry to delete WSL distribution shortcut for up to 10 seconds#41046
Blue (OneBlue) merged 1 commit into
masterfrom
user/oneblue/shortcut-delete

Conversation

@OneBlue

Copy link
Copy Markdown
Collaborator

Summary of the Pull Request

This change updates the shortcut deletion logic to retry for up to 10 seconds.

We've seen test failures where the shortcut failed to delete with ERROR_SHARING_VIOLATION. Retrying for a small amount of time should solve the issue and stabilize the tests

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings July 9, 2026 22:58
@OneBlue
Blue (OneBlue) requested a review from a team as a code owner July 9, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves robustness of WSL distribution uninstall cleanup by adding retry logic when deleting the Start Menu shortcut, addressing intermittent test failures caused by transient ERROR_SHARING_VIOLATION file locks.

Changes:

  • Replace single-attempt shortcut deletion with wsl::shared::retry::RetryWithTimeout (100ms interval, 10s timeout) gated to retry only on ERROR_SHARING_VIOLATION.
  • Preserve best-effort behavior by catching/logging failures after retries rather than failing distribution deletion.

@OneBlue
Blue (OneBlue) merged commit 0ed515a into master Jul 10, 2026
12 checks passed
@OneBlue
Blue (OneBlue) deleted the user/oneblue/shortcut-delete branch July 10, 2026 18:03
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.

3 participants