Skip to content

Retry transient executable permission errors - #4997

Open
awnoa wants to merge 1 commit into
rust-lang:mainfrom
awnoa:agent/retry-make-executable
Open

Retry transient executable permission errors#4997
awnoa wants to merge 1 commit into
rust-lang:mainfrom
awnoa:agent/retry-make-executable

Conversation

@awnoa

@awnoa awnoa commented Aug 5, 2026

Copy link
Copy Markdown

Fixes #4648.

Self-update can occasionally fail while making the downloaded rustup-init executable when another process temporarily makes the file unavailable. This change retries transient NotFound, PermissionDenied, and ResourceBusy errors using a short Fibonacci backoff with jitter, while still returning non-transient errors immediately.

A unit test covers recovery after transient permission-setting failures.

Testing

  • cargo fmt --all -- --check
  • cargo test --features=test retry_set_permissions_after_transient_errors
  • cargo clippy --all --all-targets --all-features -- -D warnings

@awnoa
awnoa marked this pull request as ready for review August 5, 2026 02: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.

failed to set permissions on rustup self update

1 participant