From f23922009bb274737e38f419bd47a3b36fd39009 Mon Sep 17 00:00:00 2001 From: HBobertz Date: Wed, 25 Sep 2024 14:33:15 -0400 Subject: [PATCH] add hotswap support --- packages/aws-cdk/lib/api/hotswap/common.ts | 4 ++-- .../aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/aws-cdk/lib/api/hotswap/common.ts b/packages/aws-cdk/lib/api/hotswap/common.ts index eb4b787d04e92..16fd72df1b827 100644 --- a/packages/aws-cdk/lib/api/hotswap/common.ts +++ b/packages/aws-cdk/lib/api/hotswap/common.ts @@ -1,5 +1,5 @@ import * as cfn_diff from '@aws-cdk/cloudformation-diff'; -import { ISDK } from '../aws-auth'; +import { ISDKv3 } from '../aws-auth'; export const ICON = '✨'; @@ -18,7 +18,7 @@ export interface HotswappableChange { */ readonly resourceNames: string[]; - readonly apply: (sdk: ISDK) => Promise; + readonly apply: (sdk: ISDKv3) => Promise; } export interface NonHotswappableChange { diff --git a/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts b/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts index dadf403333583..322bf47f8b1ed 100644 --- a/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts +++ b/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts @@ -1,5 +1,5 @@ import { ChangeHotswapResult, classifyChanges, HotswappableChangeCandidate } from './common'; -import { ISDK } from '../aws-auth'; +import { ISDKv3 } from '../aws-auth'; import { EvaluateCloudFormationTemplate } from '../evaluate-cloudformation-template'; export async function isHotswappableStateMachineChange( @@ -26,7 +26,7 @@ export async function isHotswappableStateMachineChange( propsChanged: namesOfHotswappableChanges, service: 'stepfunctions-service', resourceNames: [`${change.newValue.Type} '${stateMachineArn?.split(':')[6]}'`], - apply: async (sdk: ISDK) => { + apply: async (sdk: ISDKv3) => { if (!stateMachineArn) { return; } @@ -35,7 +35,7 @@ export async function isHotswappableStateMachineChange( await sdk.stepFunctions().updateStateMachine({ stateMachineArn, definition: await evaluateCfnTemplate.evaluateCfnExpression(change.propertyUpdates.DefinitionString.newValue), - }).promise(); + }); }, }); }