Skip to content

Commit 2b4aa37

Browse files
committed
Auto merge of #365 - pietroalbini:fix-minio-s3, r=pietroalbini
Fix S3 uploading to Minio Something recently changed in either rusoto or minio, and uploads were failing due to "unknown error". This PR fixes the bug and adds more error reporting to it. cc @BuiKristy, since you're changing S3 code
2 parents b91fbb8 + 3b1ed15 commit 2b4aa37

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/report/s3.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ impl ReportWriter for S3Writer {
120120
continue;
121121
}
122122
r => {
123+
if let Err(::rusoto_s3::PutObjectError::Unknown(ref resp)) = r {
124+
error!("S3 request status: {}", resp.status);
125+
error!("S3 request body: {}", String::from_utf8_lossy(&resp.body));
126+
error!("S3 request headers: {:?}", resp.headers);
127+
}
123128
r.with_context(|_| format!("S3 failure to upload {:?}", path.as_ref()))?;
124129
return Ok(());
125130
}

src/server/tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl BucketRegion {
1818
match *self {
1919
BucketRegion::S3 { ref region } => Ok(region.parse()?),
2020
BucketRegion::Custom { ref url } => Ok(Region::Custom {
21-
name: "custom".to_string(),
21+
name: "us-east-1".to_string(),
2222
endpoint: url.clone(),
2323
}),
2424
}

0 commit comments

Comments
 (0)