Skip to content

Commit

Permalink
updated inline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
atanaspam committed Sep 3, 2024
1 parent 6cde237 commit 305b920
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/aws-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ You can optionally configure the behavior of your hotswap deployments in `cdk.js
}
```


**⚠ Note #1**: This command deliberately introduces drift in CloudFormation stacks in order to speed up deployments.
For this reason, only use it for development purposes.
**Never use this flag for your production deployments**!
Expand Down
1 change: 1 addition & 0 deletions packages/aws-cdk/lib/api/hotswap/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export class EcsHotswapProperties {
if (maximumHealthyPercent !== undefined && maximumHealthyPercent < 0 ) {
throw new Error('hotswap-ecs-maximum-healthy-percent can\'t be a negative number');
}
// In order to preserve the current behaviour, when minimumHealthyPercent is not defined, it will be set to the currently default value of 0
if (minimumHealthyPercent == undefined) {
this.minimumHealthyPercent = 0;
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/api/hotswap/ecs-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function isHotswappableEcsServiceChange(
// hotswap is not possible in FALL_BACK mode
reportNonHotswappableChange(ret, change, undefined, 'No ECS services reference the changed task definition', false);
} if (resourcesReferencingTaskDef.length > ecsServicesReferencingTaskDef.length) {
// if something besides an ECS Service is rxeferencing the TaskDefinition,
// if something besides an ECS Service is referencing the TaskDefinition,
// hotswap is not possible in FALL_BACK mode
const nonEcsServiceTaskDefRefs = resourcesReferencingTaskDef.filter(r => r.Type !== 'AWS::ECS::Service');
for (const taskRef of nonEcsServiceTaskDefRefs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,6 @@ describe.each([HotswapMode.FALL_BACK, HotswapMode.HOTSWAP_ONLY])('%p mode', (hot
describe.each([
new Configuration().settings.set(['hotswap'], { ecs: { minimumHealthyPercent: 10 } }),
new Configuration().settings.set(['hotswap'], { ecs: { minimumHealthyPercent: 10, maximumHealthyPercent: 100 } }),
new Configuration().settings.set(['hotswap'], { ecs: { minimumHealthyPercent: 10, maximumHealthyPercent: 100 } }),
])('hotswap properties', (settings) => {
test('should handle all possible hotswap properties', async () => {
// GIVEN
Expand Down

0 comments on commit 305b920

Please sign in to comment.