Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S3 canary match statement #2358

Merged
merged 4 commits into from
Feb 13, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions tools/ci-cdk/canary-lambda/src/s3_canary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ pub async fn s3_canary(client: s3::Client, s3_bucket_name: String) -> anyhow::Re
CanaryError(format!("Expected object {} to not exist in S3", test_key)).into(),
);
}
Err(err) => match err.into_service_error() {
GetObjectError::NoSuchKey(..) => {
// good
Err(err) => {
let err = err.into_service_error();
// If we get anything other than "No such key", we have a problem
if !err.is_no_such_key() {
return Err(err).context("unexpected s3::GetObject failure");
}
err => Err(err).context("unexpected s3::GetObject failure")?,
},
}
}

// Put the test object
Expand Down