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(autoscaling): support default instance warmup for Auto Scaling groups #23285

Merged
merged 16 commits into from
Dec 14, 2022

Conversation

HBobertz
Copy link
Contributor

@HBobertz HBobertz commented Dec 8, 2022

  • add support for defaultInstanceWarmup

Can read more about defaultInstanceWarmup here: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html

Cloudformation previously didn't support this feature in their resource but recently added support. This PR is just to add support for that prop in the construct

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html


All Submissions:

Adding new Construct Runtime Dependencies:

  • This PR adds new construct runtime dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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 bot commented Dec 8, 2022

@github-actions github-actions bot added the p2 label Dec 8, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team December 8, 2022 17:30
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 8, 2022
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

@HBobertz HBobertz changed the title Add Support for Default Instance Warmup feat(aws-autoscaling): Add Support for Default Instance Warmup Dec 8, 2022
Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

Conditional approval on adding a unit test for the new prop + updating the README

@comcalvi comcalvi added the pr/do-not-merge This PR should not be merged at this time. label Dec 8, 2022
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 9, 2022 15:52

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

@mrgrain mrgrain changed the title feat(aws-autoscaling): Add Support for Default Instance Warmup feat(autoscaling): support for Default Instance Warmup Dec 12, 2022
@mrgrain mrgrain changed the title feat(autoscaling): support for Default Instance Warmup feat(autoscaling): support default instance warmup for Auto Scaling groups Dec 12, 2022
@@ -574,6 +574,28 @@ autoScalingGroup.addWarmPool({
});
```

### Default Instance Warming

You can use the default instance warmup feature to improve the Amazon CloudWatch metrics used for dynamic scaling. When default instance warmup is not enabled, each instance starts contributing usage data to the aggregated metrics as soon as the instance reaches the InService state. However, if you enable default instance warmup, this lets your instances finish warming up before they contribute the usage data.
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets split these up into different lines for better readability in raw mode.


// ...

defaultInstanceWarmup: cdk.Duration.seconds(5),
Copy link
Contributor

Choose a reason for hiding this comment

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

ok i'm going to investigate why this succeeded in the first place because it really shouldn't :). but you should know:

these examples are required to be compiling, and can show up in the API documentation as stand-alone examples without the markdown context surrounding it. the way we compile it is to copy/paste the example into ///here inside the rosetta/default.ts-fixture file. It's worth taking a look at that file and seeing what I mean, and then updating this example to work inside of there (i.e. we haven't imported cdk inside the default fixture).

*
* @see https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html
*
* @default None
Copy link
Contributor

Choose a reason for hiding this comment

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

is this what we decided on? if so, I don't like calling the default none. That's not very descriptive for the user, because what does none imply? there's no default instance warmup? or that the value is 0? we can afford to be a bit more descriptive here (and i know we say None all over the place, but we should hold ourselves to that standard :) ).

@HBobertz HBobertz removed the pr/do-not-merge This PR should not be merged at this time. label Dec 13, 2022
@mergify
Copy link
Contributor

mergify bot commented Dec 14, 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).

@HBobertz
Copy link
Contributor Author

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2022

refresh

✅ Pull request refreshed

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 5b4ec30
  • 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 3f706e2 into aws:main Dec 14, 2022
@mergify
Copy link
Contributor

mergify bot commented Dec 14, 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).

brennanho pushed a commit to brennanho/aws-cdk that referenced this pull request Jan 20, 2023
…roups (aws#23285)

- add support for defaultInstanceWarmup

Can read more about defaultInstanceWarmup here: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html

Cloudformation previously didn't support this feature in their resource but recently added support. This PR is just to add support for that prop in the construct

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Construct Runtime Dependencies:

* [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
brennanho pushed a commit to brennanho/aws-cdk that referenced this pull request Feb 22, 2023
…roups (aws#23285)

- add support for defaultInstanceWarmup

Can read more about defaultInstanceWarmup here: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html

Cloudformation previously didn't support this feature in their resource but recently added support. This PR is just to add support for that prop in the construct

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Construct Runtime Dependencies:

* [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants