Skip to content

Commit 9198807

Browse files
authored
fix(cloudwatch): setting gauge widget annotations caused deployment failures (#27720)
A badly formed annotation was being added when annotations were set for gauge widgets (`yAxis: 'annotations'`). This caused errors on deployment. This change removes that extra annotation. Closes #25496. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 72bf499 commit 9198807

File tree

11 files changed

+479
-4
lines changed

11 files changed

+479
-4
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-cloudwatch/test/integ.gauge-widget.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.assets.json

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

packages/@aws-cdk-testing/framework-integ/test/aws-cloudwatch/test/integ.gauge-widget.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.template.json

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

packages/@aws-cdk-testing/framework-integ/test/aws-cloudwatch/test/integ.gauge-widget.js.snapshot/cdk.out

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

packages/@aws-cdk-testing/framework-integ/test/aws-cloudwatch/test/integ.gauge-widget.js.snapshot/gauge-alarm.assets.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"Resources": {
3+
"Dashboard9E4231ED": {
4+
"Type": "AWS::CloudWatch::Dashboard",
5+
"Properties": {
6+
"DashboardBody": {
7+
"Fn::Join": [
8+
"",
9+
[
10+
"{\"widgets\":[{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":0,\"properties\":{\"view\":\"gauge\",\"title\":\"My gauge widget\",\"region\":\"",
11+
{
12+
"Ref": "AWS::Region"
13+
},
14+
"\",\"metrics\":[[\"AWS/VPN\",\"TunnelState\",\"TunnelIpAddress\",\"123.123.123.123\",{\"stat\":\"Minimum\"}]],\"annotations\":{\"horizontal\":[{\"color\":\"#b2df8d\",\"label\":\"Up\",\"value\":5,\"fill\":\"above\"}]},\"yAxis\":{\"left\":{\"min\":0,\"max\":10}},\"period\":60,\"stat\":\"Minimum\"}}]}"
15+
]
16+
]
17+
}
18+
}
19+
}
20+
},
21+
"Parameters": {
22+
"BootstrapVersion": {
23+
"Type": "AWS::SSM::Parameter::Value<String>",
24+
"Default": "/cdk-bootstrap/hnb659fds/version",
25+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
26+
}
27+
},
28+
"Rules": {
29+
"CheckBootstrapVersion": {
30+
"Assertions": [
31+
{
32+
"Assert": {
33+
"Fn::Not": [
34+
{
35+
"Fn::Contains": [
36+
[
37+
"1",
38+
"2",
39+
"3",
40+
"4",
41+
"5"
42+
],
43+
{
44+
"Ref": "BootstrapVersion"
45+
}
46+
]
47+
}
48+
]
49+
},
50+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
51+
}
52+
]
53+
}
54+
}
55+
}

packages/@aws-cdk-testing/framework-integ/test/aws-cloudwatch/test/integ.gauge-widget.js.snapshot/integ.json

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

packages/@aws-cdk-testing/framework-integ/test/aws-cloudwatch/test/integ.gauge-widget.js.snapshot/manifest.json

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

0 commit comments

Comments
 (0)