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(lambda-layer-node-proxy-agent): Replace use of package.json with Dockerfile command npm install [package]@[version] #17078

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

ryparker
Copy link
Contributor

@ryparker ryparker commented Oct 20, 2021

Summary

This PR fixes an issue where the package.json file used in lambda-layer-node-proxy-agent was not being bundled into monocdk / CDK v2. This is due to limitations of Ubergen. Ubergen only copies .ts files, README.md files and some special .json files.

This PR:

  • Removes the package.json from packages/@aws-cdk/lambda-layer-node-proxy-agent/layer
  • Adds a step in the layer's Dockerfile to install a specific version of proxy-agent i.e. npm install [package]@[version]. This is so that we can do without the package.json file while still managing which version we bundle with the layer.

Fixes: #17061


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

@gitpod-io
Copy link

gitpod-io bot commented Oct 20, 2021

@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Oct 20, 2021
@ryparker ryparker assigned ryparker and unassigned nija-at Oct 20, 2021
@ryparker ryparker added contribution/core This is a PR that came from AWS. and removed aws-cdk-lib Related to the aws-cdk-lib package labels Oct 20, 2021
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Oct 20, 2021
@ryparker ryparker added monocdk Related to the monocdk package and removed aws-cdk-lib Related to the aws-cdk-lib package labels Oct 20, 2021
@ryparker ryparker added the pr/do-not-merge This PR should not be merged at this time. label Oct 20, 2021
@ryparker
Copy link
Contributor Author

Added pr/do-not-merge label while I wait for CDK repo to build and then successfully deploy an EKS with this fix (using monocdk).

@ryparker ryparker added the pr-linter/exempt-test The PR linter will not require test changes label Oct 20, 2021
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 651f906
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@ryparker
Copy link
Contributor Author

Testing was successful. I was able to synth and deploy an EKS using monocdk and CDKv2.

@ryparker ryparker removed the pr/do-not-merge This PR should not be merged at this time. label Oct 20, 2021
@mergify mergify bot merged commit a129046 into master Oct 20, 2021
@mergify mergify bot deleted the fix-monocdk-and-v2-support-for-eks branch October 20, 2021 21:49
@mergify
Copy link
Contributor

mergify bot commented Oct 20, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@ryparker ryparker added the aws-cdk-lib Related to the aws-cdk-lib package label Oct 20, 2021
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…Dockerfile command `npm install [package]@[version]` (aws#17078)

## Summary

This PR fixes an issue where the package.json file used in `lambda-layer-node-proxy-agent` was not being bundled into monocdk / CDK v2. This is due to limitations of Ubergen. Ubergen only copies .ts  files, README.md  files and some special .json files.

This PR:
- Removes the package.json from `packages/@aws-cdk/lambda-layer-node-proxy-agent/layer`
- Adds a step in the layer's Dockerfile to install a specific version of `proxy-agent` i.e. `npm install [package]@[version]`. This is so that we can do without the `package.json` file while still managing which version we bundle with the layer.

Fixes: aws#17061

----

*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-lib Related to the aws-cdk-lib package contribution/core This is a PR that came from AWS. monocdk Related to the monocdk package pr-linter/exempt-test The PR linter will not require test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(monocdk/aws-eks, CDKv2): error when building EKS cluster with monocdk import
4 participants