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: eks and s3-deployment are broken in v1.81.0 #12291

Closed
pahud opened this issue Dec 31, 2020 · 13 comments · Fixed by #12293
Closed

‼️ NOTICE: eks and s3-deployment are broken in v1.81.0 #12291

pahud opened this issue Dec 31, 2020 · 13 comments · Fixed by #12293
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service @aws-cdk/aws-s3-deployment bug This issue is a bug. management/tracking Issues that track a subject or multiple issues p0

Comments

@pahud
Copy link
Contributor

pahud commented Dec 31, 2020

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


Status: IN-PROGRESS

Overview

The @aws-cdk/aws-eks and @aws-cdk/aws-s3-deployment modules are broken in v1.81.0 of the AWS CDK due to a missing file in the npm bundle.

Complete Error Message

no such file or directory, open '.../node_modules/@aws-cdk/lambda-layer-???/layer/Dockerfile

Workaround

Until we are able to release a fix, if you are using one of these modules, you have the following workarounds:

Solution

A solution for the root cause can be found in #12293 and will published as soon as we are able to release the AWS CDK. We will likely be able to release this immediately after New Years Eve 🎉 .


This is 🐛 Bug Report

@pahud pahud added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 31, 2020
@pahud
Copy link
Contributor Author

pahud commented Dec 31, 2020

copy @eladb

@pahud
Copy link
Contributor Author

pahud commented Dec 31, 2020

If you are developing aws cdk constructs with projen like me and your construct depends on aws-eks, consider cdkVersionPinning on 1.80.0 atm.

const project = new AwsCdkConstructLibrary({
  cdkVersion: '1.80.0',
  cdkVersionPinning: true,

@eladb
Copy link
Contributor

eladb commented Dec 31, 2020

Shoot. Thanks for reporting. We will issue a patch as soon as possible.

@eladb eladb added p0 and removed needs-triage This issue or PR still needs to be triaged. labels Dec 31, 2020
eladb pushed a commit that referenced this issue Dec 31, 2020
…ing file

The `Dockerfile` which we use as the source for layer asset hash calculation was excluded from the npm tarball since it was inside the `layer` directory (which was in .npmignore).

This change de-excludes this file.

Fixes #12291
@eladb eladb pinned this issue Dec 31, 2020
@eladb eladb changed the title (lambda-layer-awscli): missing Dockerfile aws-eks/aws-s3-deployment broken in v1.81.0 due to missing file from npm tarball Dec 31, 2020
@eladb eladb changed the title aws-eks/aws-s3-deployment broken in v1.81.0 due to missing file from npm tarball eks and s3-deployment are broken in v1.81.0 due to missing file from npm tarball Dec 31, 2020
@eladb eladb changed the title eks and s3-deployment are broken in v1.81.0 due to missing file from npm tarball eks and s3-deployment are broken in v1.81.0 (missing file from npm tarball) Dec 31, 2020
@eladb
Copy link
Contributor

eladb commented Dec 31, 2020

@pahud can you try the above workaround and let us know if it works for you?

@eladb eladb changed the title eks and s3-deployment are broken in v1.81.0 (missing file from npm tarball) ‼️ NOTICE: eks and s3-deployment are broken in v1.81.0 (missing file from npm tarball) Dec 31, 2020
@eladb eladb changed the title ‼️ NOTICE: eks and s3-deployment are broken in v1.81.0 (missing file from npm tarball) ‼️ NOTICE: eks and s3-deployment are broken in v1.81.0 Dec 31, 2020
@eladb eladb added management/tracking Issues that track a subject or multiple issues @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service @aws-cdk/aws-s3-deployment labels Dec 31, 2020
@pahud
Copy link
Contributor Author

pahud commented Dec 31, 2020

@pahud can you try the above workaround and let us know if it works for you?

OK let me try again.

@pahud
Copy link
Contributor Author

pahud commented Dec 31, 2020

Hi @eladb

I fetched the layer directory from your branch into my local @aws-cdk/lambda-layer-awscli/ and @aws-cdk/lambda-layer-kubectl/ under node_modules and now it can deploy with no error.

The PR works!

@pahud
Copy link
Contributor Author

pahud commented Dec 31, 2020

And the workaround patch function works as well.

@eladb
Copy link
Contributor

eladb commented Dec 31, 2020

Original issue:

I was developing cdk contructs with the latest v1.81.0 and looks like the Dockerfile is missing in the npm package

cdk --app 'npx ts-node src/integ.default.ts' diff
ENOENT: no such file or directory, open '/Users/pahud/github/cdk-kubesphere/node_modules/@aws-cdk/lambda-layer-awscli/layer/Dockerfile'
Subprocess exited with error 1

圖片

assetHash: hashFile(path.join(__dirname, '..', 'layer', 'Dockerfile')),

I believe the same error should occur in lambda-layer-kubectl.

We probably should remove this line:

Reproduction Steps

What did you expect to happen?

What actually happened?

Environment

  • **CDK CLI Version : 1.81.0
  • Framework Version:
  • Node.js Version:
  • OS :
  • Language (Version):

Other

@mergify mergify bot closed this as completed in #12293 Dec 31, 2020
mergify bot pushed a commit that referenced this issue Dec 31, 2020
…ing file (#12293)

The `layer/Dockerfile` which we use as the source for layer asset hash calculation was excluded from the npm tarball since it was inside the `layer` directory (which was in .npmignore).

This change de-excludes this file.

Fixes #12291


----

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

@kkanchinadam
Copy link

Had the same issue. Applying the patch resolved it.

@hom-bahrani
Copy link
Contributor

hom-bahrani commented Jan 2, 2021

Had the same issue deploying a lambda function via an S3 bucket

const sourceBucket = new s3.Bucket(this, 'LambdaSourceBucket', {
      versioned: true,
      bucketName: 'lambdasourcebucket48257402798011'
    });

    new s3deploy.BucketDeployment(this, 'DeployLambdaCode', {
      sources: [s3deploy.Source.asset('../sqs-lambda/dist.zip')],
      destinationBucket: sourceBucket
    });

tried using version 1.80.0 and 1.79.0 but neither worked. Got the error message ENOENT: no such file or directory, open '.../node_modules/@aws-cdk/lambda-layer-awscli/layer/Dockerfile'

Patch by @pahud is working ok, many thanks

@eladb
Copy link
Contributor

eladb commented Jan 3, 2021

We released the fix as part of v1.82.0, the patch is no longer required.

@eladb eladb closed this as completed Jan 3, 2021
@eladb eladb unpinned this issue Jan 3, 2021
@github-actions
Copy link

github-actions bot commented Jan 3, 2021

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

flochaz pushed a commit to flochaz/aws-cdk that referenced this issue Jan 5, 2021
…ing file (aws#12293)

The `layer/Dockerfile` which we use as the source for layer asset hash calculation was excluded from the npm tarball since it was inside the `layer` directory (which was in .npmignore).

This change de-excludes this file.

Fixes aws#12291


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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 @aws-cdk/aws-s3-deployment 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.

4 participants