question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[aws-lambda-nodejs] failing frequently on PR builds

See original GitHub issue

@nija-at Not sure if you’re sure of the cause, but the test for @aws-cdk/aws-lambda-nodejs frequently fails. Seen it couple times now, even though the code is unrelated. Always seems to resolve itself after merging master branch in again

_Originally posted by @iRoachie in https://github.com/aws/aws-cdk/pull/11092#issuecomment-718857366_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
nija-atcommented, Oct 30, 2020

Pasting the log snip directly here since logs are retained for only 30 days.

@aws-cdk/aws-lambda-nodejs: yarn run v1.22.5
@aws-cdk/aws-lambda-nodejs: $ npm run build && npm test
@aws-cdk/aws-lambda-nodejs: > @aws-cdk/aws-lambda-nodejs@0.0.0 build /codebuild/output/src818950319/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-lambda-nodejs
@aws-cdk/aws-lambda-nodejs: > cdk-build
@aws-cdk/aws-lambda-nodejs: Build times for @aws-cdk/aws-lambda-nodejs: Total time (17.7s) | /codebuild/output/src818950319/src/github.com/aws/aws-cdk/node_modules/jsii/bin/jsii (10.3s)
@aws-cdk/aws-lambda-nodejs: > @aws-cdk/aws-lambda-nodejs@0.0.0 test /codebuild/output/src818950319/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-lambda-nodejs
@aws-cdk/aws-lambda-nodejs: > cdk-test
@aws-cdk/aws-lambda-nodejs: PASS test/util.test.js
@aws-cdk/aws-lambda-nodejs: FAIL test/bundling.test.js
@aws-cdk/aws-lambda-nodejs:   ● Test suite failed to run
@aws-cdk/aws-lambda-nodejs:     SyntaxError: /codebuild/output/src818950319/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-lambda-nodejs/package.json: Error while parsing JSON - Unexpected end of JSON input
@aws-cdk/aws-lambda-nodejs:         at JSON.parse (<anonymous>)
@aws-cdk/aws-lambda-nodejs:       at readConfigPackage (../../../node_modules/@babel/core/lib/config/files/package.js:57:20)
@aws-cdk/aws-lambda-nodejs:       at ../../../node_modules/@babel/core/lib/config/files/utils.js:36:12
@aws-cdk/aws-lambda-nodejs:       at Function.<anonymous> (../../../node_modules/@babel/core/lib/gensync-utils/async.js:26:3)
@aws-cdk/aws-lambda-nodejs:       at evaluateSync (../../../node_modules/gensync/index.js:244:28)
@aws-cdk/aws-lambda-nodejs:       at Function.sync (../../../node_modules/gensync/index.js:84:14)
@aws-cdk/aws-lambda-nodejs:       at sync (../../../node_modules/@babel/core/lib/gensync-utils/async.js:66:25)
@aws-cdk/aws-lambda-nodejs:       at sync (../../../node_modules/gensync/index.js:177:19)
@aws-cdk/aws-lambda-nodejs: PASS test/function.test.js (8.395 s)
@aws-cdk/aws-lambda-nodejs: PASS test/docker.test.js (72.631 s)
@aws-cdk/aws-lambda-nodejs: =============================== Coverage summary ===============================
@aws-cdk/aws-lambda-nodejs: Statements   : 80% ( 76/95 )
@aws-cdk/aws-lambda-nodejs: Branches     : 53.75% ( 43/80 )
@aws-cdk/aws-lambda-nodejs: Functions    : 75% ( 9/12 )
@aws-cdk/aws-lambda-nodejs: Lines        : 79.79% ( 75/94 )
@aws-cdk/aws-lambda-nodejs: ================================================================================
@aws-cdk/aws-lambda-nodejs: Jest: "global" coverage threshold for branches (60%) not met: 53.75%
@aws-cdk/aws-lambda-nodejs: Test Suites: 1 failed, 3 passed, 4 total
@aws-cdk/aws-lambda-nodejs: Tests:       16 passed, 16 total
@aws-cdk/aws-lambda-nodejs: Snapshots:   0 total
@aws-cdk/aws-lambda-nodejs: Time:        73.338 s
@aws-cdk/aws-lambda-nodejs: Ran all test suites.
@aws-cdk/aws-lambda-nodejs: Error: /codebuild/output/src818950319/src/github.com/aws/aws-cdk/node_modules/jest/bin/jest.js exited with error code 1
@aws-cdk/aws-lambda-nodejs: Tests failed. Total time (1m14.3s) | /codebuild/output/src818950319/src/github.com/aws/aws-cdk/node_modules/jest/bin/jest.js (1m14.3s)
@aws-cdk/aws-lambda-nodejs: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@aws-cdk/aws-lambda-nodejs: npm ERR! Test failed.  See above for more details.
@aws-cdk/aws-lambda-nodejs: error Command failed with exit code 1.
@aws-cdk/aws-lambda-nodejs: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
1reaction
iRoachiecommented, Oct 30, 2020

@jogold Here’s a recent build

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing Node.js dependencies in AWS Lambda
AWS Lambda offers support for Node.js versions 12, ... Create a “build” script in the script section of the package.json file:.
Read more >
AWS Lambda – FAQs
Using AWS Lambda to process AWS events. Q: What is an event source? An event source is an AWS service or developer-created application...
Read more >
Best practices for working with AWS Lambda functions
Best practices for using AWS Lambda. ... For an example, see Reusing Connections with Keep-Alive in Node.js. Use environment variables to pass operational ......
Read more >
Creating an application with continuous delivery in the ...
The Lambda console provides starter projects for common application types with Node.js sample code and templates that create supporting resources.
Read more >
Troubleshoot deployment issues in Lambda
When you deploy updates to your function directly with the Lambda API or with a client such as the AWS CLI, you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found