Skip to content

Commit

Permalink
add hotswap support
Browse files Browse the repository at this point in the history
  • Loading branch information
HBobertz committed Sep 25, 2024
1 parent 47bb682 commit f239220
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk/lib/api/hotswap/common.ts
Original file line number Diff line number Diff line change
@@ -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 = '✨';

Expand All @@ -18,7 +18,7 @@ export interface HotswappableChange {
*/
readonly resourceNames: string[];

readonly apply: (sdk: ISDK) => Promise<void>;
readonly apply: (sdk: ISDKv3) => Promise<void>;
}

export interface NonHotswappableChange {
Expand Down
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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;
}
Expand All @@ -35,7 +35,7 @@ export async function isHotswappableStateMachineChange(
await sdk.stepFunctions().updateStateMachine({
stateMachineArn,
definition: await evaluateCfnTemplate.evaluateCfnExpression(change.propertyUpdates.DefinitionString.newValue),
}).promise();
});
},
});
}
Expand Down

0 comments on commit f239220

Please sign in to comment.