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

revert(aws-eks): "fix(aws-eks): Support for http proxy in EKS onEvent lambda" #16651

Merged
merged 2 commits into from
Sep 24, 2021

Conversation

ryparker
Copy link
Contributor

A bug was introduced in this commit that broke the onEvent EKS cluster handler lambda. ESBuild was inlining the node_module proxy-agent which was trying to read a file that did not exist (because all dependencies were bundled into a single file).

e.g.

var contextify = fs.readFileSync('/var/task/contextify.js');

Error:

ENOENT: no such file or directory, open '/var/task/contextify.js' Logs: /aws/lambda/test-fixed-nobundle-eks-wit-OnEventHandler42BEBAE0-s2cZwaWDW0xt at Object.openSync (fs.js:462:3) at Object.readFileSync (fs.js:364:35) at loadAndCompileScript (/var/task/index.js:29479:23) at ../aws-cdk/node_modules/vm2/lib/main.js (/var/task/index.js:29490:25) at __require (/var/task/index.js:26:44) at ../aws-cdk/node_modules/vm2/index.js (/var/task/index.js:30079:23) at __require (/var/task/index.js:26:44) at ../aws-cdk/node_modules/degenerator/dist/src/index.js (/var/task/index.js:30091:17) at __require (/var/task/index.js:26:44) at ../aws-cdk/node_modules/pac-resolver/dist/index.js (/var/task/index.js:30857:25) (RequestId: c44d1357-fbce-4f96-8c23-b865c2c3aaff)

This reverts commit cf22280.


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 Sep 24, 2021

@ryparker ryparker added @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service contribution/core This is a PR that came from AWS. labels Sep 24, 2021
@mergify
Copy link
Contributor

mergify bot commented Sep 24, 2021

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@ryparker ryparker changed the title Revert: "fix(aws-eks): Support for http proxy in EKS onEvent lambda: Revert: "fix(aws-eks): Support for http proxy in EKS onEvent lambda" Sep 24, 2021
@ryparker ryparker changed the title Revert: "fix(aws-eks): Support for http proxy in EKS onEvent lambda" revert(aws-eks): "fix(aws-eks): Support for http proxy in EKS onEvent lambda" Sep 24, 2021
@ryparker ryparker self-assigned this Sep 24, 2021
Copy link
Contributor

@NGL321 NGL321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as both original commit and fix are already approved.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify mergify bot merged commit 376c837 into master Sep 24, 2021
@mergify mergify bot deleted the revert-fix-eks-lambda-proxy branch September 24, 2021 20:13
@mergify
Copy link
Contributor

mergify bot commented Sep 24, 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 added a commit that referenced this pull request Sep 24, 2021
… lambda" (#16651)

A bug was introduced in [this commit](cf22280) that broke the `onEvent` EKS cluster handler lambda. ESBuild was inlining the node_module `proxy-agent` which was trying to read a file that did not exist (because all dependencies were bundled into a single file).

e.g.
```ts
var contextify = fs.readFileSync('/var/task/contextify.js');
```

Error:
```log
ENOENT: no such file or directory, open '/var/task/contextify.js' Logs: /aws/lambda/test-fixed-nobundle-eks-wit-OnEventHandler42BEBAE0-s2cZwaWDW0xt at Object.openSync (fs.js:462:3) at Object.readFileSync (fs.js:364:35) at loadAndCompileScript (/var/task/index.js:29479:23) at ../aws-cdk/node_modules/vm2/lib/main.js (/var/task/index.js:29490:25) at __require (/var/task/index.js:26:44) at ../aws-cdk/node_modules/vm2/index.js (/var/task/index.js:30079:23) at __require (/var/task/index.js:26:44) at ../aws-cdk/node_modules/degenerator/dist/src/index.js (/var/task/index.js:30091:17) at __require (/var/task/index.js:26:44) at ../aws-cdk/node_modules/pac-resolver/dist/index.js (/var/task/index.js:30857:25) (RequestId: c44d1357-fbce-4f96-8c23-b865c2c3aaff)
```

This reverts commit cf22280.

----

*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 contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants