-
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
fix(eks): Could not use ec2 instance type and size that their names contains dashes #28040
Conversation
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.
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.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
Hey, @moelasmar thank you for opening a contribution with us.
Couple of comments,
- The PR title, when it is a fix should tell more about the error/issue and not the solution. So for instance,
fix(ec2): instance type and size regex does not accommodate dashes
- Could you add to integ test present in ec2 to verify we are able to provision these instances. If you are unable to run these test on your account, please let me know and I can verify those.
@@ -223,7 +223,7 @@ class EksClusterStack extends Stack { | |||
instanceTypes: [ | |||
new ec2.InstanceType('c5.large'), | |||
new ec2.InstanceType('c5a.large'), | |||
new ec2.InstanceType('c5d.large'), | |||
new ec2.InstanceType('m7i-flex.large'), |
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.
Were you able to run this integ test and deploy the resource to your account?
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.
I was able to run the test case, but I did not try to deploy it, let me try to deploy it.
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.
Thank you. Let me know if I can help.
The problem is mainly related to adding new managed node groups to an EKS Cluster, and not while creating EC2 instances. The problem is mainly in these 2 functions: aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts Lines 1517 to 1544 in 3b3fc3a
Where are mainly used in these functions in eks managed nodegroup aws-cdk/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Lines 559 to 579 in f9ee5e6
Anyway, I will try to add a new Ec2 test case |
Hey @moelasmar , I ran the integ test and have added that. Looks like the |
e5dfdfd
to
3b0d489
Compare
I found some issues on resolving the conflicts, so I start from a fresh fork of the main branch, and added my changes again. |
3b0d489
to
fb07b36
Compare
f462335
to
340cc73
Compare
@Mergifyio update |
✅ Branch has been successfully updated |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
it is already approved by paulhcsun, and the requested change got resolved
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). |
Fix the Ec2 instance class regular expression to accept values that contains dashes like (m7i-flex, and metal-48xl).
Closes #27587.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license