Skip to content

Commit

Permalink
Retry on spurious failures when caching built wheels (#4605)
Browse files Browse the repository at this point in the history
#2419 appears to have only applied
this retry to wheels that were already downloaded (though I would have
to look more carefully to be certain). In
#1491, we've gotten continued
reports of spurious failures on Windows and tracing reveals that we are
not applying our retry logic during the rename. I believe we're in this
code path — switching to our backoff retry should resolve the failures.
  • Loading branch information
zanieb committed Jun 28, 2024
1 parent 14564f9 commit f3c7de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/uv-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use pep440_rs::Version;
use pep508_rs::PackageName;
use pypi_types::{Requirement, VerbatimParsedUrl};
use uv_configuration::{BuildKind, ConfigSettings, SetupPyStrategy};
use uv_fs::{PythonExt, Simplified};
use uv_fs::{rename_with_retry, PythonExt, Simplified};
use uv_toolchain::{Interpreter, PythonEnvironment};
use uv_types::{BuildContext, BuildIsolation, SourceBuildTrait};

Expand Down Expand Up @@ -757,7 +757,7 @@ impl SourceBuild {

let from = tmp_dir.path().join(&filename);
let to = wheel_dir.join(&filename);
fs_err::rename(from, to)?;
rename_with_retry(from, to).await?;
Ok(filename)
} else {
if self.build_kind != BuildKind::Wheel {
Expand Down

0 comments on commit f3c7de3

Please sign in to comment.