From 55a66a21ad74281fc2b47c82dc05fa26e52abaec Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Tue, 8 Nov 2022 08:35:31 -0800 Subject: [PATCH] Fix canary Lambda invoke success check (#1960) Co-authored-by: Zelda Hessler --- tools/ci-cdk/canary-runner/src/run.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ci-cdk/canary-runner/src/run.rs b/tools/ci-cdk/canary-runner/src/run.rs index 747498906..19d604872 100644 --- a/tools/ci-cdk/canary-runner/src/run.rs +++ b/tools/ci-cdk/canary-runner/src/run.rs @@ -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 -- GitLab