-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(ec2): Support for new EBS types #12074
Conversation
Added new EBS types released in re:Invent 2020 and fixed some documentation problems closes aws#12071
PR Linter checked failed, but I don't know what I need to add to the README file. There is no section talking about EBS Types in all the packages I changed. Please let me know and I can change. Ty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting it. A few comments about the docs, and lets remove all the added tests
@@ -338,6 +338,25 @@ nodeunitShim({ | |||
test.done(); | |||
}, | |||
|
|||
'volume: io2'(test: Test) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is nothing special about the volume type, there is no need to add a unit test for it. Given the large number of types, adding a test for each one will increase the overall tests execution time without providing additional value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'm going to remove this test and all the others! As I saw tests with specific volume types, I considered it important for the process. But it makes sense not to increase the execution time of the tests.
@@ -226,7 +247,7 @@ nodeunitShim({ | |||
|
|||
// THEN | |||
test.deepEqual(instance.node.metadata[0].type, cxschema.ArtifactMetadataEntryType.WARN); | |||
test.deepEqual(instance.node.metadata[0].data, 'iops will be ignored without volumeType: EbsDeviceVolumeType.IO1'); | |||
test.deepEqual(instance.node.metadata[0].data, 'iops will be ignored without volumeType: EbsDeviceVolumeType.IO1 or EbsDeviceVolumeType.IO2'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning is confusing. From the code it seems like setting volumeType to EbsDeviceVolumeType.IO2
without setting iops is not allowed, but the warning implies the other way around?
Same comment as below, if this test is not adding any value we shouldn't add it.
If these were added to satisfy the linter rule, note that I have added an exempt label so it will not block the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! As the comment above, I'll remove this test too.
Pull request has been modified.
…into feature/new-ebs-types
…ascena/aws-cdk into feature/new-ebs-types
Removed unnecessary tests. closes aws#12071
I removed all the added tests and committed again. Let me know if I need to change anything else. |
Removed Trailing spaces. closes aws#12071
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). |
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
closes aws#12071 Added new EBS types released in re:Invent 2020 and fixed some documentation problems. Some observations: ./packages/@aws-cdk/aws-elasticsearch/lib/domain.ts - The Elasticsearch service allows only General Purpose, Provisioned IOPS and Magnetic. ./packages/@aws-cdk/aws-rds/lib/instance.ts - Storage types and the official link were added For compatibility reasons, I kept the " GENERAL_PURPOSE_SSD" as GP2 and created a new type called "GENERAL_PURPOSE_SSD_GP3" for GP3. The same happened to IO1/IO2. Please let me know if it is correct, I think it is the best way to not break stacks that already exist with these definitions. @NetaNir ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes #12816. * add validation: must specify `iops` if `volumeType` is `io1` or `io2` * fix validation: `iops` may only be specified if the `volumeType` is `io1`, `io2` or `gp3` * fix validation: `iops` minimum & maximum for `io1`, `io2` and `gp3` respectively * fix validation: `iops` maximum ratio (IOPS/Gib) for `io1`, `io2` and `gp3` respectively * fix validation: `multi-attach` is supported exclusively on `io1` and `io2` volumes. * fix validation: `size` minimum & maximum for all `volumeType` (including `gp3` and `io2` which was a bug specified in #12816) Unit tests are either added / fixed for above changes. References: #12074 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes aws#12816. * add validation: must specify `iops` if `volumeType` is `io1` or `io2` * fix validation: `iops` may only be specified if the `volumeType` is `io1`, `io2` or `gp3` * fix validation: `iops` minimum & maximum for `io1`, `io2` and `gp3` respectively * fix validation: `iops` maximum ratio (IOPS/Gib) for `io1`, `io2` and `gp3` respectively * fix validation: `multi-attach` is supported exclusively on `io1` and `io2` volumes. * fix validation: `size` minimum & maximum for all `volumeType` (including `gp3` and `io2` which was a bug specified in aws#12816) Unit tests are either added / fixed for above changes. References: aws#12074 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes aws#12816. * add validation: must specify `iops` if `volumeType` is `io1` or `io2` * fix validation: `iops` may only be specified if the `volumeType` is `io1`, `io2` or `gp3` * fix validation: `iops` minimum & maximum for `io1`, `io2` and `gp3` respectively * fix validation: `iops` maximum ratio (IOPS/Gib) for `io1`, `io2` and `gp3` respectively * fix validation: `multi-attach` is supported exclusively on `io1` and `io2` volumes. * fix validation: `size` minimum & maximum for all `volumeType` (including `gp3` and `io2` which was a bug specified in aws#12816) Unit tests are either added / fixed for above changes. References: aws#12074 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
closes #12071
Added new EBS types released in re:Invent 2020 and fixed some documentation problems. Some observations:
./packages/@aws-cdk/aws-elasticsearch/lib/domain.ts - The Elasticsearch service allows only General Purpose, Provisioned IOPS and Magnetic.
./packages/@aws-cdk/aws-rds/lib/instance.ts - Storage types and the official link were added
For compatibility reasons, I kept the " GENERAL_PURPOSE_SSD" as GP2 and created a new type called "GENERAL_PURPOSE_SSD_GP3" for GP3. The same happened to IO1/IO2. Please let me know if it is correct, I think it is the best way to not break stacks that already exist with these definitions.
@NetaNir
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license