Skip to content

Commit

Permalink
Update plumbing to use values from the ApiGateway struct
Browse files Browse the repository at this point in the history
  • Loading branch information
EricGhildyal authored and RobbieMcKinstry committed Nov 26, 2024
1 parent 823cb8b commit 341dd29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/adapters/ingresses/apig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ async fn read_file(artifact_path: PathBuf) -> Result<Vec<u8>> {
impl Ingress for AwsApiGateway {
async fn deploy(&mut self) -> Result<()> {
// First, we need to deploy the new version of the lambda
let lambda_version = self.upload_lambda("releases").await?;
let lambda_version = self.upload_lambda(&self.lambda_name).await?;

// Next, we need to create a new deployment, pointing at our
// new lambda version with canary settings
self.create_apig_deployment(
"Releases",
"prod",
"releases",
&self.gateway_name,
&self.stage_name,
&self.lambda_name,
&lambda_version,
WholePercent::try_new(0).into_diagnostic()?,
)
Expand All @@ -195,7 +195,7 @@ impl Ingress for AwsApiGateway {
}

async fn set_canary_traffic(&mut self, percent: WholePercent) -> Result<()> {
self.update_canary_traffic("Releases", "prod", percent)
self.update_canary_traffic(&self.gateway_name, &self.stage_name, percent)
.await?;

Ok(())
Expand Down

0 comments on commit 341dd29

Please sign in to comment.