Skip to content
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

@aws-cdk/aws-cloudwatch/lib/alarm.ts: Cloudwatch Alarm with p100 statistics is missing ExtendedStatistic property in CFN template after recent cdk change. #24976

Closed
pearlswan opened this issue Apr 6, 2023 · 2 comments · Fixed by #24981
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 p0

Comments

@pearlswan
Copy link

pearlswan commented Apr 6, 2023

Describe the bug

Starting recently, I noticed when using p100 statistics for cloudwatch Alarms, the generated CFN template is missing ExtendedStatistic property. However the same code was working previously. Also p100 is a valid value if create alarm from AWS console.

Looks like this change changes behavior for validating percentiles.
853e3d6

Expected Behavior

The generated CFN template should have ExtendedStatistic property.

Current Behavior

The generated CFN template is missing the ExtendedStatistic property.

Reproduction Steps

        const alarm = new Alarm(this, `----`, {
            alarmName: `----`,
            metric: new Metric({
                dimensionsMap: {
                    Program: program,
                },
                metricName: '----',
                namespace: namespace ,
                period: Duration.minutes(1),
                statistic: Stats.p(100),
            }),
            comparisonOperator: ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
            evaluationPeriods: 1,
            threshold: ----,
            treatMissingData: TreatMissingData.NOT_BREACHING,
        });

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

na

Framework Version

No response

Node.js Version

14

OS

macOs

Language

Typescript

Language Version

No response

Other information

No response

@pearlswan pearlswan added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 6, 2023
@github-actions github-actions bot added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Apr 6, 2023
@peterwoodworth
Copy link
Contributor

Thanks for reporting this, I was able to confirm that the "ExtendedStatistic": "p100", prop in the template disappears before and after this change. We will try to address this promptly

@peterwoodworth peterwoodworth added p0 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Apr 6, 2023
rix0rrr added a commit that referenced this issue Apr 7, 2023
Since #23095 (which was released in 2.66.0), the `p100` statistic
is no longer rendered into Alarms.

Fixes #24976.
@mergify mergify bot closed this as completed in #24981 Apr 7, 2023
mergify bot pushed a commit that referenced this issue Apr 7, 2023
Since #23095 (which was released in 2.66.0), the `p100` statistic is no longer rendered into Alarms.

Fixes #24976.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 p0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants