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

feat(aws-cloudwatch-actions): add ssm incidents as alarm action #21167

Merged
merged 8 commits into from
Aug 10, 2022

Conversation

callumthomson
Copy link
Contributor

@callumthomson callumthomson commented Jul 15, 2022

Finishes work originally contributed by @dosatos by addressing changes requested by @comcalvi in #20553

closes #20552

aws-byeldos and others added 2 commits May 31, 2022 13:59
…tion

This small PR will add SSM Incident action to cloudwatch alarm.
The arn format was taken from the UI console (under Incident Manager Response Plan)
Finishes work originally contributed by @dosatos by addressing changes requested by @comcalvi in aws#20553
closes aws#20552
@gitpod-io
Copy link

gitpod-io bot commented Jul 15, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team July 15, 2022 15:00
@github-actions github-actions bot added the p2 label Jul 15, 2022
Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great! I think we'll need an integration test for this, though. Could you please add one?

@mergify mergify bot dismissed TheRealAmazonKendra’s stale review July 24, 2022 17:18

Pull request has been modified.

@callumthomson
Copy link
Contributor Author

I've added an integration test using IntegTest, but I think more is needed. Could you please let me know if this is a step in the right direction, @TheRealAmazonKendra ?

Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@callumthomson Your integ test file is what we're looking for. We just need you to generate the expected template and assets. See our integration test guide.

I've also added a few comments inline regarding the specific errors in the build.

@mergify mergify bot dismissed TheRealAmazonKendra’s stale review August 9, 2022 19:55

Pull request has been modified.

@callumthomson
Copy link
Contributor Author

@TheRealAmazonKendra I've added in the requested changes. Please let me know any further desired amendments.

Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment inline but it also looks like your test can use SSM Incident as alarm action isn't working because the partition is a reference in the actual output, but you've used a literal in your expected output. We just need to get this test working so the build passes. If you have any questions about this, please let me know.

packages/@aws-cdk/aws-cloudwatch-actions/README.md Outdated Show resolved Hide resolved
@mergify mergify bot dismissed TheRealAmazonKendra’s stale review August 10, 2022 09:46

Pull request has been modified.

@callumthomson
Copy link
Contributor Author

@TheRealAmazonKendra that seems to be working now, but there appears to have been an error in aws-appsync:

@aws-cdk/aws-appsync: Verifying integration test snapshots...
@aws-cdk/aws-appsync: /codebuild/output/src184008709/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-appsync/lib/graphqlapi.js:371
@aws-cdk/aws-appsync:             throw Error('API key expiration must be between 1 and 365 days.');
@aws-cdk/aws-appsync:             ^
@aws-cdk/aws-appsync: Error: API key expiration must be between 1 and 365 days.
@aws-cdk/aws-appsync:     at GraphqlApi.createAPIKey (/codebuild/output/src184008709/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-appsync/lib/graphqlapi.js:371:19)
@aws-cdk/aws-appsync:     at new GraphqlApi (/codebuild/output/src184008709/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-appsync/lib/graphqlapi.js:188:40)
@aws-cdk/aws-appsync:     at Object.<anonymous> (/codebuild/output/src184008709/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js:23:13)
@aws-cdk/aws-appsync:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
@aws-cdk/aws-appsync:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@aws-cdk/aws-appsync:     at Module.load (internal/modules/cjs/loader.js:950:32)
@aws-cdk/aws-appsync:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@aws-cdk/aws-appsync:     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
@aws-cdk/aws-appsync:     at internal/main/run_main_module.js:17:47

@TheRealAmazonKendra
Copy link
Contributor

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2022

update

✅ Branch has been successfully updated

@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2022

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: ee7e8b8
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 471511e into aws:main Aug 10, 2022
@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2022

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).

josephedward pushed a commit to josephedward/aws-cdk that referenced this pull request Aug 30, 2022
…21167)

Finishes work originally contributed by @dosatos by addressing changes requested by @comcalvi in [aws#20553](aws#20553)

closes [aws#20552](aws#20552)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-cloudwatch-actions): Add the possibility to have SSM Incident Action
4 participants