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

eks: integ.eks-helm-asset.ts is failing #25438

Closed
pahud opened this issue May 4, 2023 · 2 comments · Fixed by #25448
Closed

eks: integ.eks-helm-asset.ts is failing #25438

pahud opened this issue May 4, 2023 · 2 comments · Fixed by #25448
Assignees
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@pahud
Copy link
Contributor

pahud commented May 4, 2023

Describe the bug

In integ.eks-helm-asset.ts, two helm charts with exactly the same release name might lead to race condition with the error and fail the integ test.

 Error: b'Release "lambda-chart-release" does not exist. Installing it now.\nError: release: already exists\n'

this.cluster.addHelmChart('test-oci-chart-different-release-name', {
chart: 'lambda-chart',
release: 'lambda-chart-release',
repository: 'oci://public.ecr.aws/aws-controllers-k8s/lambda-chart',
version: 'v0.1.4',
namespace: 'ack-system',
createNamespace: true,
});
// testing the disable mechanism of the installation of CRDs
this.cluster.addHelmChart('test-skip-crd-installation', {
chart: 'lambda-chart',
release: 'lambda-chart-release',
repository: 'oci://public.ecr.aws/aws-controllers-k8s/lambda-chart',
version: 'v0.1.4',
namespace: 'ack-system',
createNamespace: true,
skipCrds: true,
});

Expected Behavior

yarn integ on this integ test should succeed with no error.

Current Behavior

 Error: b'Release "lambda-chart-release" does not exist. Installing it now.\nError: release: already exists\n'

Reproduction Steps

Just yarn integ on this test with --force to force the deployment.

Possible Solution

I tried to build dependency between them but the error still occurred. This is because helm chart install is async and when the custom resource returns it does mean the release has completely installed. Generally, we don't add two helm charts with the same release name like that in real environment. We probably should replace one of them with another helm chart to avoid that.

Additional Information/Context

No response

CDK CLI Version

2.77.0

Framework Version

No response

Node.js Version

1.16

OS

mac os x

Language

Typescript

Language Version

No response

Other information

No response

@pahud pahud added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 4, 2023
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label May 4, 2023
@pahud
Copy link
Contributor Author

pahud commented May 4, 2023

working on it

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 4, 2023
@pahud pahud self-assigned this May 4, 2023
@mergify mergify bot closed this as completed in #25448 May 5, 2023
mergify bot pushed a commit that referenced this issue May 5, 2023
This PR fixes 2 integ tests from aws-eks.

- `integ.eks-helm-assets` is failing because 2 helm charts are trying to install with the same release name and this is failing with race condition.  This PR replaces one of them with another helm chart from ACK to avoid that and ensures the integ test will succeed.
- `integ.eks-service-account-sdk-call` is missing `package.json` and `sdk-call.js` as described in #25178 and `docker build` is failing due to missing files. We restored them from [v2.72.1](https://github.com/aws/aws-cdk/tree/v2.72.1/packages/%40aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app) with minor update on the test.

Now both integ tests can successfully run with no error.

Closes #25438 #25178 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented May 5, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant