-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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): replace node 8 usages, allow node 10 inline assets #4655
Conversation
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the NODE_LATEST idea. @nija-at @rix0rrr @RomainMuller what do you guys think?
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Could a team member add a "do-not-merge" tag to this PR, waiting for aws-cloudformation-coverage-roadmap#80 to ship? Thanks! |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
It looks like CloudFormation now supports inline code for Nodejs10 Lambda functions (tried these out myself) |
@nija-at Great, thanks for letting me know! I'll merge master and see if there are new usages, but this should be good to go |
It should be good to go 👍 |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I have a couple of concerns around Firstly, does node guarantee that future proofing, i.e., all node8 scripts are valid node10, and so on? If not, we'll be breaking customers (at runtime which is worse) whenever we change Secondly, it is entirely within Lambda's contract and CloudFormation's contract to modify or stop supporting a feature that existed until one major version language to the next. A good example is where, for a significant period of time, CloudFormation supported inline code for Node8 but not for Node10. If we had swiched While this was a matter of time, I can other potential situations where such compatibility features and not available for a while; or upgrade is simply not possible without customers additional or modified attributes. How do we handle such scenarios? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes themselves look good to me.
-
See my previous comment regarding
NODE_LATEST
. -
For all places in the CDK, where the CDK is shipping its own Lambda function as part of its construct and impacted by this change, could we run at least one integ test to deploy the stack to a real account and execute the function at least once for correctness of functionality?
@@ -75,7 +75,7 @@ const resource = new serverless.CfnFunction(this, 'Func', { | |||
bucket: asset.s3BucketName, | |||
key: asset.s3ObjectKey | |||
}, | |||
runtime: 'nodejs8.10', | |||
runtime: Runtime.NODEJS_LATEST, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid changes to the design/
folder unless you're changing the design.
Thinking a bit more on the Given these questions around this and the fact that Node8 is EOL in December (coming around the corner), I suggest we pull out the NODE_LATEST change from here and have that as a separate discussion. (the former would be a |
Upgrade all internal uses of node8.10 lambda runtime to node10.x. This includes all exported constructs that contain a lambda function within them. Update NODE_10_X runtime to allow inline code in CloudFormation, per aws-cloudformation/cloudformation-coverage-roadmap#80. Shout out to @nmussy who got this most of the way (#4655) close #4653, close #4642
I got the upgrade to Node10 in through another PR - #5075 I'll be closing out on this one. Feel free to open another one if you want to discuss the |
supportsInlineCode
totrue
forRuntime.NODEJS_10_X
Runtime.NODE_LATEST
, currently aliasingRuntime.NODEJS_10_X
Runtime.NODE_LATEST
Fixes #4653
Fixes #4642
Before merging, aws-cloudformation-coverage-roadmap#80 is still "Coming soon", we need to wait for it to be implemented
Alternative: It might be more maintainable to add "latest/stable" runtimes instead, aliasing the preferred version (e.g.
Runtime.NODE_STABLE
pointing toNODE_10_X
)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license