Add UV_HTTP_RETRIES to customize retry counts (#14544)

I want to increase this number in CI and was surprised we didn't support
configuration yet.
This commit is contained in:
Zanie Blue 2025-07-11 07:35:27 -05:00 committed by GitHub
parent 2e0f399eeb
commit 71470b7b1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 143 additions and 1 deletions

View file

@ -402,6 +402,9 @@ impl EnvVars {
/// Timeout (in seconds) for HTTP requests. (default: 30 s)
pub const UV_HTTP_TIMEOUT: &'static str = "UV_HTTP_TIMEOUT";
/// The number of retries for HTTP requests. (default: 3)
pub const UV_HTTP_RETRIES: &'static str = "UV_HTTP_RETRIES";
/// Timeout (in seconds) for HTTP requests. Equivalent to `UV_HTTP_TIMEOUT`.
pub const UV_REQUEST_TIMEOUT: &'static str = "UV_REQUEST_TIMEOUT";
@ -659,6 +662,9 @@ impl EnvVars {
#[attr_hidden]
pub const UV_TEST_VENDOR_LINKS_URL: &'static str = "UV_TEST_VENDOR_LINKS_URL";
/// Used to disable delay for HTTP retries in tests.
pub const UV_TEST_NO_HTTP_RETRY_DELAY: &'static str = "UV_TEST_NO_HTTP_RETRY_DELAY";
/// Used to set an index url for tests.
#[attr_hidden]
pub const UV_TEST_INDEX_URL: &'static str = "UV_TEST_INDEX_URL";