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

‼️ NOTICE: (aws-eks): Regression in installing Helm charts from assets #19179

Closed
oberoth opened this issue Feb 27, 2022 · 3 comments · Fixed by #19180
Closed

‼️ NOTICE: (aws-eks): Regression in installing Helm charts from assets #19179

oberoth opened this issue Feb 27, 2022 · 3 comments · Fixed by #19180
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. management/tracking Issues that track a subject or multiple issues p0

Comments

@oberoth
Copy link

oberoth commented Feb 27, 2022

Please add your +1 👍 to let us know you have encountered this

Status: IN-PROGRESS

Overview:

Helm charts fail to install because the kubectl provider Lambda assumes 'repository' is non-null. This is not the case when a Helm chart is installed from an asset. Here's the newly introduced line that creates the regression: https://github.com/aws/aws-cdk/pull/18547/files#diff-8b2da7b95e6a38620688d9fd0f02cafb4374713386c3a50f9f9ee79369a77877R83 <- Error: 'NoneType' object has no attribute 'startswith'

Solution:

PR for the fix: #19180

Reproduction Steps

Install a Helm chart from an asset.

What did you expect to happen?

Helm chart to be installed successfully.

What actually happened?

Lambda threw an exception:

[ERROR] AttributeError: 'NoneType' object has no attribute 'startswith'
Traceback (most recent call last):
File "/var/task/index.py", line 17, in handler
return helm_handler(event, context)
File "/var/task/helm/init.py", line 83, in helm_handler
if repository.startswith('oci://'):

CDK CLI Version

2.12.0 (build c9786db)

Framework Version

No response

Node.js Version

v16.13.0

OS

Linux

Language

Typescript

Language Version

No response

Other information

No response

@oberoth oberoth added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 27, 2022
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Feb 27, 2022
@otaviomacedo otaviomacedo changed the title (aws-eks): Regression in installing Helm charts from assets ‼️ NOTICE: (aws-eks): Regression in installing Helm charts from assets Feb 27, 2022
@otaviomacedo otaviomacedo added management/tracking Issues that track a subject or multiple issues p0 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 27, 2022
@otaviomacedo otaviomacedo pinned this issue Feb 27, 2022
@mergify mergify bot closed this as completed in #19180 Feb 27, 2022
mergify bot pushed a commit that referenced this issue Feb 27, 2022
When the helm chart is specified by an asset instead of a respository URL, the `repository` variable in the custom resource is `None`. Adding a check before using the variable.

This bug wasn't caught by integration tests because the existing integration test that exercises EKS clusters creates a cluster with many features, including two different helm charts: one from a URL and another one from an asset. This change includes a new integration test that exclusively deploys a cluster with a helm chart from an asset.

Fixes #19179.

----

*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

⚠️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.

@otaviomacedo otaviomacedo reopened this Feb 27, 2022
mergify bot pushed a commit that referenced this issue Feb 28, 2022
One of our integration tests started failing after a [notice](https://github.com/aws/aws-cdk-rfcs/blob/master/text/0308-cli-advisories.md) was added because `cdk version` displayed information besides the actual CLI version:

```
 ● Two ways of shoing the version

    expect(received).toEqual(expected) // deep equality

    - Expected  -  0
    + Received  + 14

      2.14.0 (build 762d71b)
    +
    + NOTICES
    +
    + 19179 (aws-eks): Regression in installing Helm charts from assets
    +
    +   Overview: Helm charts fail to install when provided as an asset. This
    +             issue does not affect charts installed from a repository.
    +
    +   Affected versions: framework: 2.14.0, framework: 1.146.0
    +
    +   More information at: #19179
    +
    +
    + If you don’t want to see a notice anymore, use "cdk acknowledge <id>". For example, "cdk acknowledge 19179".

      at cli.integtest.ts:39:20
      at ../helpers/cdk.ts:130:7
      at ResourcePool.using (../helpers/resource-pool.ts:44:14)
      at ../helpers/test-helpers.ts:30:14
```

This fixes that bug.

Another option we could consider here is to keep the current behavior (where `cdk version` and `cdk --version` display different output) and just update the test case, but I think keeping them the same is probably simpler for customers.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@otaviomacedo otaviomacedo removed their assignment Mar 4, 2022
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

⚠️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.

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

⚠️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.

@rix0rrr rix0rrr unpinned this issue Mar 14, 2022
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. management/tracking Issues that track a subject or multiple issues p0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants