Skip to content

Commit

Permalink
Fix canary Lambda invoke success check (#1960)
Browse files Browse the repository at this point in the history
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
  • Loading branch information
jdisanti and Velfi authored Nov 8, 2022
1 parent 2445ddc commit 55a66a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/ci-cdk/canary-runner/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@ async fn invoke_lambda(lambda_client: lambda::Client, bundle_name: &str) -> Resu
.await
.context(here!("failed to invoke the canary Lambda"))?;

if let Some(log_result) = response.log_result {
if let Some(log_result) = response.log_result() {
info!(
"Last 4 KB of canary logs:\n----\n{}\n----\n",
std::str::from_utf8(&base64::decode(&log_result)?)?
std::str::from_utf8(&base64::decode(log_result)?)?
);
}
if response.status_code != 200 {
if response.status_code() != 200 || response.function_error().is_some() {
bail!(
"Canary failed: {}",
response
Expand Down

0 comments on commit 55a66a2

Please sign in to comment.