Skip to content

Retry file operations on access denied errors#1408

Merged
AArnott merged 1 commit into
v3.10from
betterRetry
Jul 8, 2026
Merged

Retry file operations on access denied errors#1408
AArnott merged 1 commit into
v3.10from
betterRetry

Conversation

@AArnott

@AArnott AArnott commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This should improve resiliency in cloudbuilds where multiple top-level builds are executed in the same repo concurrently (naughty).

This should improve resiliency in cloudbuilds where multiple top-level builds are executed in the same repo concurrently (naughty).
@AArnott
AArnott enabled auto-merge July 8, 2026 18:15
@AArnott AArnott added this to the v3.10 milestone Jul 8, 2026
@AArnott
AArnott requested a review from Copilot July 8, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Improves resilience of file write/update operations by retrying on additional transient file-access failures that can occur when multiple builds operate concurrently in the same working directory.

Changes:

  • Expand retry logic to treat both sharing violations and access-denied failures as transient (via IsTransientFileAccessError).
  • Ensure the final retry attempt surfaces the exception (retry only while retriesLeft > 1) and use Thread.Sleep for the backoff.

Comment thread src/Shared/Utilities.cs
@AArnott
AArnott merged commit e05abbc into v3.10 Jul 8, 2026
13 checks passed
@AArnott
AArnott deleted the betterRetry branch July 8, 2026 18:27
This was referenced Jul 8, 2026
This was referenced Jul 13, 2026
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.

2 participants