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(cloudwatch): EC2 actions #13281

Merged
merged 9 commits into from Mar 4, 2021
Merged

Conversation

@cyuste
Copy link
Contributor

@cyuste cyuste commented Feb 25, 2021

Fixes #13228

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

@gitpod-io gitpod-io bot commented Feb 25, 2021

@mergify
Copy link
Contributor

@mergify mergify bot commented Feb 25, 2021

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@cyuste cyuste changed the title feat(cw-actions) Add ec2 actions feat(cw-actions): Add ec2 actions Feb 25, 2021
@mergify mergify bot dismissed rix0rrr’s stale review Feb 25, 2021

Pull request has been modified.

Copy link
Contributor

@rix0rrr rix0rrr left a comment

Almost there, thanks for the work!

this.alarmActionArns.push(...actions.map(a => {
const actionArn = a.bind(this, this).alarmActionArn;

const ec2ActionsRegexp: RegExp = /arn:aws:automate:[a-z|\d|-]+:ec2:[a-z]+/;

This comment has been minimized.

@rix0rrr

rix0rrr Mar 3, 2021
Contributor

I don't mind this functionality living here, but could you factor it out into a separate (private) function?

// Check per-instance metric
const metricConfig = this.metric.toMetricConfig();
if (metricConfig.metricStat?.dimensions?.length != 1 || metricConfig.metricStat?.dimensions![0].name != 'InstanceId') {
throw new Error('EC2 alarm actions must use an EC2 Per-Instance Metric');

This comment has been minimized.

@rix0rrr

rix0rrr Mar 3, 2021
Contributor

The error message should show the incorrect configuration.

How about:

`EC2 alarm actions requires an EC2 Per-Instance Metric (${JSON.stringify(metricConfig)} does not have an 'InstanceId' dimension)`
@mergify mergify bot dismissed rix0rrr’s stale review Mar 3, 2021

Pull request has been modified.

@rix0rrr
rix0rrr approved these changes Mar 4, 2021
@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 4, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@rix0rrr rix0rrr changed the title feat(cw-actions): Add ec2 actions feat(cloudwatch): EC2 actions Mar 4, 2021
@aws-cdk-automation
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation commented Mar 4, 2021

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: d259dc6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 4, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 319cfcd into aws:master Mar 4, 2021
10 checks passed
10 checks passed
@github-actions
auto-approve
Details
@github-actions
auto-approve
Details
@github-actions
validate-pr
Details
@github-actions
test
Details
@github-actions
test
Details
AWS CodeBuild us-east-1 (AutoBuildProject89A8053A-LhjRyN9kxr8o) Build succeeded for project AutoBuildProject89A8053A-LhjRyN9kxr8o
Details
@gitpod-io
Gitpod Open an online workspace in Gitpod
Details
@mergify
Rule: automatic merge (merge) The pull request has been merged automatically
Details
@semantic-pull-requests
Semantic Pull Request ready to be squashed
Details
@mergify
Summary 5 potential rules
Details
This was referenced Mar 8, 2021
cornerwings added a commit to cornerwings/aws-cdk that referenced this pull request Mar 8, 2021
Fixes aws#13228
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants