[aws-cloudwatch] Incorrect comparison operator for alarm annotation label #8913
Labels
@aws-cdk/aws-cloudwatch
Related to Amazon CloudWatch
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
in-progress
This issue is being actively worked on.
p2
Alarm.OPERATOR_SYMBOLS has the incorrect string value for
LessThanOrEqualToThreshold
. Instead of<=
(less than, equal to) it has>=
(greater than, equal to).When the annotation is eagerly created (Alarm Line 201)[https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-cloudwatch/lib/alarm.ts#L201]
label:
${this.metric} ${OPERATOR_SYMBOLS[comparisonOperator]} ${props.threshold} for...` the incorrect string value is added to the annotation's label, which causes confusion as to what the alarm is actually doing since it is the exact opposite of what the alarm is doing.Reproduction Steps
LessThanOrEqualToThreshold
metric <= threshold
metric >= threshold
Environment
Other
>=
to<=
Cloudwatch alarm with the correct condition (so the alarm itself is fine)
Cloudwatch graph widget with same alarm as an annotation with incorrect comparison operator
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: