Skip to content

Commit

Permalink
feat: add retry for run export (#1349)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored Jan 17, 2025
1 parent 715f6b4 commit c9c7adc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["rust-tests"]

[package]
name = "rattler-build"
version = "0.35.2"
version = "0.35.3"
authors = ["rattler-build contributors <[email protected]>"]
repository = "https://github.com/prefix-dev/rattler-build"
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions py-rattler-build/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion py-rattler-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "py-rattler-build"
version = "0.35.2"
version = "0.35.3"
edition = "2021"
license = "BSD-3-Clause"
publish = false
Expand Down
9 changes: 8 additions & 1 deletion src/run_exports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use rattler_conda_types::{
package::{PackageFile, RunExportsJson},
RepoDataRecord,
};
use rattler_networking::retry_policies::default_retry_policy;
use reqwest_middleware::ClientWithMiddleware;
use thiserror::Error;
use tokio::sync::Semaphore;
Expand Down Expand Up @@ -96,7 +97,13 @@ impl RunExportExtractor {
.expect("semaphore error");

match package_cache
.get_or_fetch_from_url(cache_key, url, client, Some(Arc::new(progress_reporter)))
.get_or_fetch_from_url_with_retry(
cache_key,
url,
client,
default_retry_policy(),
Some(Arc::new(progress_reporter)),
)
.await
{
Ok(package_dir) => Ok(RunExportsJson::from_package_directory(package_dir.path()).ok()),
Expand Down

0 comments on commit c9c7adc

Please sign in to comment.