Skip to content

Commit b2c5d9a

Browse files
committed
Auto merge of #658 - Mark-Simulacrum:bump-deps, r=Mark-Simulacrum
Enable retries in the SDK It sounds like the previous definition for the SdkConfig would fail to configure a sleep impl, and currently that means that we're just silently not retrying any requests. This is obviously not what we want, and likely explains the repeated errors we saw on rust-lang/rust#99389 when generating the report.
2 parents 0ada18d + a29aa23 commit b2c5d9a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ indexmap = "1.4.0"
6565
tokio = "1.18"
6666
aws-types = { version = "0.46", features = ["hardcoded-credentials"] }
6767
aws-smithy-http = "0.46"
68+
aws-smithy-async = "0.46"
6869
aws-sdk-s3 = "0.16"
6970

7071
[dev-dependencies]

src/server/reports.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ fn generate_report(data: &Data, ex: &Experiment, results: &DatabaseDB) -> Fallib
2828
}
2929
}
3030
config.set_credentials_provider(Some(data.tokens.reports_bucket.to_aws_credentials()));
31+
// https://github.com/awslabs/aws-sdk-rust/issues/586 -- without this, the
32+
// SDK will just completely not retry requests.
33+
config.set_sleep_impl(Some(Arc::new(
34+
aws_smithy_async::rt::sleep::TokioSleep::new(),
35+
)));
3136
let config = config.build();
3237
let client = aws_sdk_s3::Client::new(&config);
3338
let writer = report::S3Writer::create(

0 commit comments

Comments
 (0)