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

EOL node engine 6.10 of lambda function #9341

Merged
merged 5 commits into from
Jul 16, 2019

Conversation

chaspy
Copy link
Contributor

@chaspy chaspy commented Jul 15, 2019

Community Note

  • Please vote on this pull request by adding a πŸ‘ reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #0000 Seems that the issue has not been reported

I faced the following error: (refer: https://www.terraform.io/docs/providers/aws/r/lambda_permission.html#example-usage)

   β”‚ Error: Error creating Lambda function: InvalidParameterValueException: The runtime parameter of nodejs6.10 is no longer supported for creating or updating AWS Lambda functions. We re
       β”‚ commend you use the new runtime (nodejs10.x) while creating or updating functions.
   β”‚ /Users/take/go/src/github.com/hashicorp/terraform/states/statemgr/filesystem.go:349: [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
   β”‚     status code: 400, request id: 26c1b11c-e092-45d3-bb9f-18d685d26727

Unfortunately, nodejs6.10 was EOL on April 30, 2019
ref: https://aws.amazon.com/blogs/developer/node-js-6-is-approaching-end-of-life-upgrade-your-aws-lambda-functions-to-the-node-js-10-lts/

Release note for CHANGELOG:


None of FEATURES, ENHANCEMENT and BUG FIX. This is just updating doc and test.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSLambdaFunction_updateRuntime'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSLambdaFunction_updateRuntime -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSLambdaFunction_updateRuntime
=== PAUSE TestAccAWSLambdaFunction_updateRuntime
=== CONT  TestAccAWSLambdaFunction_updateRuntime
--- PASS: TestAccAWSLambdaFunction_updateRuntime (87.40s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	87.465s

nodejs6.10 was EOL on April 30, 2019
ref: https://aws.amazon.com/blogs/developer/node-js-6-is-approaching-end-of-life-upgrade-your-aws-lambda-functions-to-the-node-js-10-lts/

cmd: git grep nodejs6.10 | cut -d ':' -f1 | xargs sed -i.bak -e 's/nodejs6.10/nodejs8.10/g'
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/lambda Issues and PRs that pertain to the lambda service. service/pinpoint Issues and PRs that pertain to the pinpoint service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. dependencies Used to indicate dependency changes. documentation Introduces or discusses updates to documentation. labels Jul 15, 2019
@chaspy chaspy marked this pull request as ready for review July 15, 2019 14:57
@chaspy chaspy requested a review from a team July 15, 2019 14:57
Copy link
Member

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Hi @chaspy πŸ‘‹ Thank you for contributing these fixes. Please see the two items below and reach out if you have any questions or do not have time to implement the changes.

@@ -1724,7 +1724,7 @@ resource "aws_lambda_function" "lambda_function_test" {
function_name = "%s"
role = "${aws_iam_role.iam_for_lambda.arn}"
handler = "exports.example"
runtime = "nodejs6.10"
runtime = "nodejs8.10"
Copy link
Member

Choose a reason for hiding this comment

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

The TestAccAWSLambdaFunction_updateRuntime test that references this test configuration should be performing an update of the runtime argument and this change will make the runtime value the same as the first test step. Can you please update this to another runtime value (e.g. nodejs10.x) and ensure the test check matches the new value? Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed: ccfd957

@@ -345,7 +345,7 @@ resource "aws_lambda_layer_version" "lambda_layer_test" {
filename = "test-fixtures/lambdatest.zip"
layer_name = "%s"

compatible_runtimes = ["nodejs8.10", "nodejs6.10"]
Copy link
Member

Choose a reason for hiding this comment

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

The TestAccAWSLambdaLayerVersion_compatibleRuntimes test that references this test configuration is currently expecting two values for the compatible_runtimes argument:

https://github.com/terraform-providers/terraform-provider-aws/blob/feacc804717a491202318f1ab217f5c76fa049e1/aws/resource_aws_lambda_layer_version_test.go#L168

Can you please add back a second runtime, e.g. nodejs10.x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed: 95128f1

@bflad bflad added technical-debt Addresses areas of the codebase that need refactoring or redesign. waiting-response Maintainers are waiting on response from community or contributor. and removed dependencies Used to indicate dependency changes. labels Jul 16, 2019
@bflad bflad self-assigned this Jul 16, 2019
@chaspy chaspy force-pushed the chaspy/eol-lambda-nodejs6-10 branch from 1f62607 to 95128f1 Compare July 16, 2019 14:38
@chaspy
Copy link
Contributor Author

chaspy commented Jul 16, 2019

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSLambdaFunction_updateRuntime'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSLambdaFunction_updateRuntime -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSLambdaFunction_updateRuntime
=== PAUSE TestAccAWSLambdaFunction_updateRuntime
=== CONT  TestAccAWSLambdaFunction_updateRuntime
--- PASS: TestAccAWSLambdaFunction_updateRuntime (88.75s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	88.816s

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Jul 16, 2019
@chaspy
Copy link
Contributor Author

chaspy commented Jul 16, 2019

@bflad thank you for your review! Ready for review again πŸ‘

@bflad bflad added this to the v2.20.0 milestone Jul 16, 2019
Copy link
Member

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks, @chaspy! πŸš€

--- PASS: TestAccAWSLambdaFunction_updateRuntime (79.24s)

--- PASS: TestAccAWSLambdaLayerVersion_compatibleRuntimes (19.91s)

--- PASS: TestAccAWSPinpointApp_CampaignHookLambda (30.43s)

@bflad bflad merged commit ee671e2 into hashicorp:master Jul 16, 2019
@ghost
Copy link

ghost commented Nov 2, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/lambda Issues and PRs that pertain to the lambda service. service/pinpoint Issues and PRs that pertain to the pinpoint service. size/XS Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants