Skip to content

feat(ec2): add mac1 instance#17677

Merged
mergify[bot] merged 8 commits intoaws:masterfrom
robertd:add-mac1-instances
Nov 26, 2021
Merged

feat(ec2): add mac1 instance#17677
mergify[bot] merged 8 commits intoaws:masterfrom
robertd:add-mac1-instances

Conversation

@robertd
Copy link
Copy Markdown
Contributor

@robertd robertd commented Nov 24, 2021

mac1 instances got released last year:
https://aws.amazon.com/about-aws/whats-new/2021/10/amazon-ec2-mac-instances-additional-regions/

Docs have already been updated a while ago:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-instancetype

Note: Whenever mac2 comes out (probably on M1, or most likely on M1Pro/M1Max) we'll have to update InstanceArchitecture enum here.


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
Copy Markdown

gitpod-io bot commented Nov 24, 2021

@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Nov 24, 2021
@pahud
Copy link
Copy Markdown
Contributor

pahud commented Nov 26, 2021

should we add a similar test like this for mac1 as well?

test('instance architecture is correctly discerned for x86-64 instance', () => {
// GIVEN
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i']; // A sample of x86-64 instance classes
for (const instanceClass of sampleInstanceClasses) {
// WHEN
const instanceType = InstanceType.of(instanceClass as InstanceClass, InstanceSize.XLARGE18);
// THEN
expect(instanceType.architecture).toBe(InstanceArchitecture.X86_64);
}

@neilkuan @kimisme9386 @dwchiang can you take a peek at this?

@robertd
Copy link
Copy Markdown
Contributor Author

robertd commented Nov 26, 2021

@pahud Updated tests... however mac1 instance can only run on metal so this particular test is not 100% accurate from InstanceSize perspective, but that's not what the test is about and it works :)

@njlynch
Copy link
Copy Markdown
Contributor

njlynch commented Nov 26, 2021

@pahud - We typically (historically) haven't added tests for enum additions like this. If there's new functionality, then a test is required, but if it's literally "one more value that reacts identically to the other 100", then a test is a bit redundant.

@robertd - Given this test isn't totally accurate, I think reverting makes more sense. I can do that on your behalf here.

@njlynch njlynch added pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes labels Nov 26, 2021
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 4bec45c
  • 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 88a5204 into aws:master Nov 26, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 26, 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).

@robertd robertd deleted the add-mac1-instances branch November 29, 2021 16:58
beezly pushed a commit to beezly/aws-cdk that referenced this pull request Nov 29, 2021
`mac1` instances got released last year:
https://aws.amazon.com/about-aws/whats-new/2021/10/amazon-ec2-mac-instances-additional-regions/

Docs have already been updated a while ago:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-instancetype

Note: Whenever `mac2` comes out (probably on M1, or most likely on M1Pro/M1Max) we'll have to update `InstanceArchitecture` enum [here](https://github.com/aws/aws-cdk/blob/ddf2881ee24cbf3083463a6e772a5c91acc229aa/packages/%40aws-cdk/aws-ec2/lib/instance-types.ts#L573).

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
pedrosola pushed a commit to pedrosola/aws-cdk that referenced this pull request Dec 1, 2021
`mac1` instances got released last year:
https://aws.amazon.com/about-aws/whats-new/2021/10/amazon-ec2-mac-instances-additional-regions/

Docs have already been updated a while ago:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-instancetype

Note: Whenever `mac2` comes out (probably on M1, or most likely on M1Pro/M1Max) we'll have to update `InstanceArchitecture` enum [here](https://github.com/aws/aws-cdk/blob/ddf2881ee24cbf3083463a6e772a5c91acc229aa/packages/%40aws-cdk/aws-ec2/lib/instance-types.ts#L573).

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
`mac1` instances got released last year:
https://aws.amazon.com/about-aws/whats-new/2021/10/amazon-ec2-mac-instances-additional-regions/

Docs have already been updated a while ago:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-instancetype

Note: Whenever `mac2` comes out (probably on M1, or most likely on M1Pro/M1Max) we'll have to update `InstanceArchitecture` enum [here](https://github.com/aws/aws-cdk/blob/ddf2881ee24cbf3083463a6e772a5c91acc229aa/packages/%40aws-cdk/aws-ec2/lib/instance-types.ts#L573).

----

*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

@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants