Skip to content

Commit abf17b0

Browse files
committed
fix: adjust default value for TargetResponseAlarm
1 parent eac8f0a commit abf17b0

File tree

7 files changed

+103
-8
lines changed

7 files changed

+103
-8
lines changed

__snapshots__/app/assembly-cdk-pipeline-cdk-source-example/manifest.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__snapshots__/app/assembly-cdk-pipeline-cloud-assembly-example/manifest.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__snapshots__/app/manifest.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lefthook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pre-commit:
2727

2828
- name: lint json
2929
glob: "*.json"
30-
run: jsonlint {staged_files} --no-duplicate-keys --compact --quiet
30+
run: npx --no -- jsonlint {staged_files} --no-duplicate-keys --compact --quiet
3131

3232
- name: validate renovate config
3333
glob: "renovate.json*"

package-lock.json

Lines changed: 84 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/alarms/__tests__/__snapshots__/service-alarms.test.ts.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/alarms/service-alarms.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export class ServiceAlarms extends constructs.Construct {
191191
*/
192192
evaluationPeriods?: number
193193
/**
194-
* @default 500 milliseconds
194+
* @default 1s
195195
*/
196196
threshold?: cdk.Duration
197197
description?: string
@@ -304,12 +304,12 @@ export class ServiceAlarms extends constructs.Construct {
304304
`5% of responses from ECS service '${
305305
this.serviceName
306306
}' are taking longer than the expected duration of ${(
307-
props.targetResponseTimeAlarm?.threshold ?? cdk.Duration.millis(500)
308-
).toMilliseconds()} ms.`,
307+
props.targetResponseTimeAlarm?.threshold ?? cdk.Duration.seconds(1)
308+
).toSeconds({ integral: false })} s.`,
309309
comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
310310
evaluationPeriods: props.targetResponseTimeAlarm?.evaluationPeriods ?? 1,
311311
threshold: (
312-
props.targetResponseTimeAlarm?.threshold ?? cdk.Duration.millis(500)
312+
props.targetResponseTimeAlarm?.threshold ?? cdk.Duration.seconds(1)
313313
).toSeconds({ integral: false }),
314314
treatMissingData: cloudwatch.TreatMissingData.IGNORE,
315315
})

0 commit comments

Comments
 (0)