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

fix(eks): neuron plugin not added with addNodegroupCapacity() #27909

Merged
merged 5 commits into from
Dec 19, 2023

Conversation

gdamjan
Copy link
Contributor

@gdamjan gdamjan commented Nov 9, 2023

Previously, the neuron plugin is already added in the addAutoScalingGroupCapacity() method, when the instanceType was some of the INFERENTIA types.

Let's also add the plugin if at least one (some/any) of the instanceTypes in addNodegroupCapacity() is of the INFERENTIA types.


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

@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Nov 9, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team November 9, 2023 12:20
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.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@gdamjan
Copy link
Contributor Author

gdamjan commented Nov 9, 2023

Clarification Request

❌ Features must contain a change to a README file.

The neuron plugin was not mentioned previously in the aws-eks README file, so I didn't know where to document this semi-new behaviour. Should I add a note that the plugin is added when using both addNodegroupCapacity() and addAutoScalingGroupCapacity() ?

@aws-cdk-automation aws-cdk-automation added pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Nov 9, 2023
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution 👍

I think that this is more a fix than a feature, can please you update the title following the guidelines?

Also, an integration test is needed.
You can use this as a template and check the documentation for its execution.

packages/aws-cdk-lib/aws-eks/lib/cluster.ts Outdated Show resolved Hide resolved
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 10, 2023
@gdamjan gdamjan changed the title feat(eks): add neuron plugin in addNodegroupCapacity() fix(eks): add neuron plugin in addNodegroupCapacity() Nov 13, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review November 14, 2023 11:47

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

Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks, looks good 👍
Can you please update the title to fix(eks): neuron plugin not added with addNodegroupCapacity?
It should describe the bug (not the solution).

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 14, 2023
@gdamjan gdamjan changed the title fix(eks): add neuron plugin in addNodegroupCapacity() fix(eks): neuron plugin not added with addNodegroupCapacity() Nov 14, 2023
@gdamjan
Copy link
Contributor Author

gdamjan commented Nov 14, 2023

Thanks, looks good 👍 Can you please update the title to fix(eks): neuron plugin not added with addNodegroupCapacity? It should describe the bug (not the solution).

should I change the commit itself too, or you'll squash merge with using the PR topic?

@lpizzinidev
Copy link
Contributor

@gdamjan
No, it's fine like this, thanks for the update 👍
The reason is that fix and feature titles will appear on the release CHANGELOG, so they need to follow a certain format.

@scanlonp scanlonp self-assigned this Nov 20, 2023
Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

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

One nit.
Do you think it would be helpful to have information about neuron plugins in the readme? If so add it, if not, then I think the exemption is fine.
Other than that, I am good to approve.

@@ -303,6 +303,7 @@ aws-eks/test/integ.eks-cluster-private-endpoint.js
aws-eks/test/integ.eks-cluster.js
aws-eks/test/integ.eks-helm-asset.js
aws-eks/test/integ.eks-inference.js
aws-eks/test/integ.eks-inference-nodegroup.js
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
aws-eks/test/integ.eks-inference-nodegroup.js

Do not think we need to update this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

afaik, the integration tests were tying to run the .ts file in that case and failing. I can try again.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 20, 2023
@gdamjan
Copy link
Contributor Author

gdamjan commented Nov 27, 2023

Do you think it would be helpful to have information about neuron plugins in the readme?

I would add something like this:

> **NOTE:** If you add instances with the inferentia (`inf1` or `inf2`) class the [neuron plugin](https://awsdocs-neuron.readthedocs-hosted.com/en/latest/containers/dlc-then-eks-devflow.html) will be automatically 
> installed in the kubernetes cluster.

just above the #### Node Groups with IPv6 Support line in the ### Managed node groups section.

what do you think?

gdamjan and others added 2 commits November 27, 2023 19:22
Previously, the neuron plugin was only added in addAutoScalingGroupCapacity() when
the instanceType was some of the INFERENTIA types.

Let's also add the plugin if at least one (some/any) of the
instanceTypes in addNodegroupCapacity() is of the INFERENTIA types.

added integration tests for the addNodegroupCapacity() feature too,
and snapshot test

Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
@mergify mergify bot dismissed scanlonp’s stale review November 27, 2023 20:21

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 27, 2023
Copy link
Contributor

mergify bot commented Dec 19, 2023

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).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 19, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 0497951
  • 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 b87212b into aws:main Dec 19, 2023
12 checks passed
Copy link
Contributor

mergify bot commented Dec 19, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants