Add missing UV_TEST_NO_HTTP_RETRY_DELAY check and better logging (#16313)

The `install_http_retries` test goes from 15s to 0.3s. Additionally, we
log the retry delay.
This commit is contained in:
konsti
2025-10-15 20:45:21 +02:00
committed by GitHub
parent 83635a6c45
commit 52cc3c8b94
4 changed files with 26 additions and 14 deletions
+5 -4
View File
@@ -973,13 +973,14 @@ impl ManagedPythonDownload {
if let reqwest_retry::RetryDecision::Retry { execute_after } =
retry_decision
{
debug!(
"Transient failure while handling response for {}; retrying...",
self.key()
);
let duration = execute_after
.duration_since(SystemTime::now())
.unwrap_or_else(|_| Duration::default());
debug!(
"Transient failure while handling response for {}; retrying after {}s...",
self.key(),
duration.as_secs()
);
tokio::time::sleep(duration).await;
retried_here = true;
continue; // Retry.