feat(cloudwatch): validate Dashboards with an end time must also have a start time#27124
Conversation
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks 👍
Just a minor change on the message.
|
@go-to-k Is this failing in CFN if |
end time without a start time
end time without a start timeDashboard defines an end time without a start time
Dashboard defines an end time without a start timeDashboard with an end time but without a start time
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
No, the deployment succeeds by CFn. Also manual setting without CFn in CloudWatch Dashboard console succeeds. But that setting is ignored and the dashboard is displayed with the default time period. I think the deployment should be stopped because the API Reference contains the following description and the user will not be aware of this situation.
And each Widget in graph.ts also validates the same case. https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts#L245-L247 |
|
Thank you, save I fully agree. We need to record these explanations on the PR for future reference. |
Dashboard with an end time but without a start timeend time must also have a start time
end time must also have a start timeend time must also have a start time
end time must also have a start timeend time must also have a start time
end time must also have a start timeend time must also have a start time
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This PR adds a validation for a
startand anendinDashboard.It throws an error if you specify an
endwithout astart.While it is possible to deploy a dashboard with only an end time in CloudFormation, the setting will be ignored and the dashboard displayed with the default time period.
With this validation, we are stopping the faulty deployment early.
API Reference contains the following description and the user will not be aware of this situation.
If you specify a value for end, you must also specify a value for start.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html
And each Widget in graph.ts also validates the same case.
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts#L245-L247
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license