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): ConfigCommand and GetTokenCommand should output by default #33673

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wafuwafu13
Copy link
Contributor

@wafuwafu13 wafuwafu13 commented Mar 2, 2025

Issue # (if applicable)

Closes #32318

Reason for this change

outputConfigCommand is true by default.

/**
* Determines whether a CloudFormation output with the `aws eks
* update-kubeconfig` command will be synthesized. This command will include
* the cluster name and, if applicable, the ARN of the masters IAM role.
*
* @default true
*/
readonly outputConfigCommand?: boolean;

Description of changes

props.mastersRole need not be true.

const outputConfigCommand = (props.outputConfigCommand ?? true) && props.mastersRole;

Describe any new or updated permissions being added

NONE

Description of how you validated changes

Pass unit tests

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team March 2, 2025 18:44
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 valued-contributor [Pilot] contributed between 6-12 PRs to the CDK labels Mar 2, 2025
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 fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

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.

@wafuwafu13 wafuwafu13 changed the title fix(eks): ConfigCommand and GetTokenCommand should output by default fix(eks): ConfigCommand and GetTokenCommand should output by default Mar 2, 2025
Copy link

codecov bot commented Mar 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.21%. Comparing base (7538a84) to head (db91ec3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33673   +/-   ##
=======================================
  Coverage   82.21%   82.21%           
=======================================
  Files         119      119           
  Lines        6876     6876           
  Branches     1162     1162           
=======================================
  Hits         5653     5653           
  Misses       1120     1120           
  Partials      103      103           
Flag Coverage Δ
suite.unit 82.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 82.21% <ø> (ø)

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: db91ec3
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation added pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. and removed pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. labels Mar 2, 2025
@wafuwafu13 wafuwafu13 marked this pull request as draft March 2, 2025 21:51
@wafuwafu13
Copy link
Contributor Author

@aws-cdk/aws-eks-v2-alpha:   UNCHANGED  integ.eks-cluster 5.698s
 @aws-cdk/aws-eks-v2-alpha: Snapshot Results: 
 @aws-cdk/aws-eks-v2-alpha: Tests:    6 failed, 14 total
 @aws-cdk/aws-eks-v2-alpha: Failed: /codebuild/output/src2051224748/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/test/integ.alb-controller.js
 @aws-cdk/aws-eks-v2-alpha: Failed: /codebuild/output/src2051224748/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-addon.js
 @aws-cdk/aws-eks-v2-alpha: Failed: /codebuild/output/src2051224748/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-inference-nodegroup.js
 @aws-cdk/aws-eks-v2-alpha: Failed: /codebuild/output/src2051224748/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-standard-access-entry.js
 @aws-cdk/aws-eks-v2-alpha: Failed: /codebuild/output/src2051224748/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-subnet-updates.js
 @aws-cdk/aws-eks-v2-alpha: Failed: /codebuild/output/src2051224748/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/test/integ.fargate-cluster.js
 @aws-cdk/aws-eks-v2-alpha: Error: Some tests failed!
 @aws-cdk/aws-eks-v2-alpha: To re-run failed tests run: integ-runner --update-on-failed
 @aws-cdk/aws-eks-v2-alpha:     at main (/codebuild/output/src2051224748/src/github.com/aws/aws-cdk/packages/@aws-cdk/integ-runner/lib/cli.js:192:19)
 aws-cdk-lib: PASS aws-stepfunctions-tasks/test/emr/emr-terminate-cluster.test.ts
 @aws-cdk/aws-eks-v2-alpha: Error: integ-runner exited with error code 1
 @aws-cdk/aws-eks-v2-alpha: Tests failed. Total time (1m8.6s) | /codebuild/output/src2051224748/src/github.com/aws/aws-cdk/node_modules/jest/bin/jest.js (1m1.8s) | integ-runner (6.6s)
 @aws-cdk/aws-eks-v2-alpha: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@wafuwafu13
Copy link
Contributor Author

wafuwafu13 commented Mar 2, 2025

$ yarn integ integ.eks-inference-nodegroup.js --parallel-regions eu-west-3 --update-on-failed

❌  aws-cdk-eks-cluster-inference-nodegroup failed: _ToolkitError: The stack named aws-cdk-eks-cluster-inference-nodegroup failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Could not unzip uploaded file. Please check your file, then try to upload again. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID:  HandlerErrorCode: GeneralServiceException)
$ yarn integ integ.eks-standard-access-entry.js --parallel-regions ap-northeast-1 --update-on-failed

❌  EKSStandardAccessEntry failed: _ToolkitError: The stack named EKSStandardAccessEntry failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Could not unzip uploaded file. Please check your file, then try to upload again. (Service: Lambda, Status Code: 400, Request ID: 9e80719f-f482-4082-b589-a4aebdf70129)" (RequestToken: d667b132-5359-ad27-d903-4a8f9496ccb7, HandlerErrorCode: InvalidRequest)
$ yarn integ integ.eks-standard-access-entry.js --parallel-regions ap-northeast-1 --update-on-failed

❌  EKSStandardAccessEntry failed: _ToolkitError: The stack named EKSStandardAccessEntry failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Could not unzip uploaded file. Please check your file, then try to upload again. (Service: Lambda, Status Code: 400, HandlerErrorCode: InvalidRequest)
$ yarn integ integ.fargate-cluster.js --parallel-regions eu-west-3 --update-on-failed

❌  eks-fargate-cluster-test-stack failed: _ToolkitError: The stack named eks-fargate-cluster-test-stack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Could not unzip uploaded file. Please check your file, then try to upload again. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 valued-contributor [Pilot] contributed between 6-12 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(EKS): outputConfigCommand does not work any more without mastersRole
2 participants