-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloudwatch): validate Dashboards with an end
time must also have a start
time
#27124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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
start
and anend
inDashboard
.It throws an error if you specify an
end
without 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