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): deprecate Python3.6 #19988

Merged
merged 7 commits into from
Jun 7, 2022
Merged

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 20, 2022

Move all automatic Custom Resources to the newest Python version, update
integ tests, add a note to the Lambda Runtime that it shouldn't be used
anymore.

Change all Python3.6 -> Python 3.9.

Fixes #20085.


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

@rix0rrr rix0rrr requested a review from a team April 20, 2022 09:04
@rix0rrr rix0rrr self-assigned this Apr 20, 2022
@gitpod-io
Copy link

gitpod-io bot commented Apr 20, 2022

@github-actions github-actions bot added the p2 label Apr 20, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 20, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team April 20, 2022 09:04
mergify bot pushed a commit that referenced this pull request Apr 20, 2022
This PR mainly addresses `python3.6` deprecation, but it also updates deprecation verbiage for other runtimes as well.

```
Hello,

We are contacting you as we have identified that your AWS Account currently has one or more Lambda functions using Python 3.6 runtime.

We are ending support for Python 3.6 in AWS Lambda. This follows Python 3.6 End-Of-Life (EOL) reached on December 23, 2021 [1].

As described in the Lambda runtime support policy [2], end of support for language runtimes in Lambda happens in two stages. Starting July 18, 2022, Lambda will no longer apply security patches and other updates to the Python 3.6 runtime used by Lambda functions, and functions using Python 3.6 will no longer be eligible for technical support. In addition, you will no longer be able to create new Lambda functions using the Python 3.6 runtime. Starting August 17, 2022, you will no longer be able to update existing functions using the Python 3.6 runtime.

We recommend that you upgrade your existing Python 3.6 functions to Python 3.9 before August 17, 2022.

End of support does not impact function execution. Your functions will continue to run. However, they will be running on an unsupported runtime which is no longer maintained or patched by the AWS Lambda team.

The following command shows how to use the AWS CLI [3] to list all functions in a specific region using Python 3.6. To find all such functions in your account, repeat this command for each region:

aws lambda list-functions --function-version ALL --region us-east-1 --output text --query "Functions[?Runtime=='python3.6'].FunctionArn"

If you have any concerns or require further assistance, please contact AWS Support [4].
```

https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html

Link #19988 

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
StevePotter pushed a commit to StevePotter/aws-cdk that referenced this pull request Apr 27, 2022
This PR mainly addresses `python3.6` deprecation, but it also updates deprecation verbiage for other runtimes as well.

```
Hello,

We are contacting you as we have identified that your AWS Account currently has one or more Lambda functions using Python 3.6 runtime.

We are ending support for Python 3.6 in AWS Lambda. This follows Python 3.6 End-Of-Life (EOL) reached on December 23, 2021 [1].

As described in the Lambda runtime support policy [2], end of support for language runtimes in Lambda happens in two stages. Starting July 18, 2022, Lambda will no longer apply security patches and other updates to the Python 3.6 runtime used by Lambda functions, and functions using Python 3.6 will no longer be eligible for technical support. In addition, you will no longer be able to create new Lambda functions using the Python 3.6 runtime. Starting August 17, 2022, you will no longer be able to update existing functions using the Python 3.6 runtime.

We recommend that you upgrade your existing Python 3.6 functions to Python 3.9 before August 17, 2022.

End of support does not impact function execution. Your functions will continue to run. However, they will be running on an unsupported runtime which is no longer maintained or patched by the AWS Lambda team.

The following command shows how to use the AWS CLI [3] to list all functions in a specific region using Python 3.6. To find all such functions in your account, repeat this command for each region:

aws lambda list-functions --function-version ALL --region us-east-1 --output text --query "Functions[?Runtime=='python3.6'].FunctionArn"

If you have any concerns or require further assistance, please contact AWS Support [4].
```

https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html

Link aws#19988 

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 and removed p2 labels May 4, 2022
@johancar
Copy link

Can we kindly get an estimate ETA when python 3.6 will be replaced in master branch in available for prod use please?

Thank you.

@rix0rrr rix0rrr added effort/large Large work item – several weeks of effort and removed effort/small Small work item – less than a day of effort labels May 19, 2022
…and-line

Snapshot errors
---------------

The constructor of `IntegSnapshotRunner` calls `loadManifest()`, which
on my computer happened to fail and stopped the entire test suite
because this error happened outside the `try/catch` block.

Move it inside the try/catch block, needed a bit of refactoring to
make sure we could still get at the test name.

`--from-file`
-------------

Instead of having `--from-file` require a JSON file with its own
structure, interpret it as a text file which gets treated exactly
the same as the `[TEST [..]]` arguments on the command line.

This still allows for the `--exclude` behavior by setting that flag
on the command-line.

Refactoring
-----------

Moved the logic around determining test names and directories into a
class (`IntegTest`) which is a convenience class on top of a static data
record (`IntegTestInfo`). We pass the data record to worker threads.
@rix0rrr rix0rrr force-pushed the huijbers/deprecate-python-3.6 branch from b268d38 to 1b53c9b Compare May 30, 2022 12:55
@rix0rrr rix0rrr marked this pull request as ready for review May 31, 2022 11:20
@github-actions github-actions bot added effort/small Small work item – less than a day of effort and removed effort/large Large work item – several weeks of effort labels May 31, 2022
@corymhall corymhall added the pr/do-not-merge This PR should not be merged at this time. label May 31, 2022
Copy link
Contributor

@corymhall corymhall left a comment

Choose a reason for hiding this comment

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

Approved, but I think this needs to be merged after #20523 so adding a do-not-merge label.

@rix0rrr rix0rrr removed the pr/do-not-merge This PR should not be merged at this time. label May 31, 2022
@mergify
Copy link
Contributor

mergify bot commented May 31, 2022

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).

…-python-3.6

# Conflicts:
#	packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts
#	packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts
#	packages/@aws-cdk/integ-runner/lib/workers/integ-snapshot-worker.ts
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify
Copy link
Contributor

mergify bot commented Jun 7, 2022

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

@mergify mergify bot merged commit 9602229 into v1-main Jun 7, 2022
@mergify mergify bot deleted the huijbers/deprecate-python-3.6 branch June 7, 2022 09:59
RomainMuller pushed a commit that referenced this pull request Jun 7, 2022
Move all automatic Custom Resources to the newest Python version, update
integ tests, add a note to the Lambda Runtime that it shouldn't be used
anymore.

Change all Python3.6 -> Python 3.9.

Fixes #20085.

----

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

# Conflicts:
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/cdk.out
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/integ.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/manifest.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/tree.json
#	packages/@aws-cdk/aws-lambda/test/function.test.ts
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/awsstepfunctionstasksemrcontainersstartjobrunintegtestawscdkawseksKubectlProviderC26A0FC7.nested.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/cdk.out
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/integ.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/manifest.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/tree.json
RomainMuller pushed a commit that referenced this pull request Jun 7, 2022
Move all automatic Custom Resources to the newest Python version, update
integ tests, add a note to the Lambda Runtime that it shouldn't be used
anymore.

Change all Python3.6 -> Python 3.9.

Fixes #20085.

----

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

# Conflicts:
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/manifest.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/tree.json
#	packages/@aws-cdk/aws-lambda/test/function.test.ts
#	packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/aws-cdk-lambda-runtime-inlinecode.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/awsstepfunctionstasksemrcontainersstartjobrunintegtestawscdkawseksKubectlProviderC26A0FC7.nested.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/manifest.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/tree.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke-function.integ.snapshot/integ.json
#	packages/@aws-cdk/lambda-layer-awscli/test/awscli-layer.integ.snapshot/lambda-layer-awscli-integ-stack.template.json
RomainMuller pushed a commit that referenced this pull request Jun 7, 2022
Move all automatic Custom Resources to the newest Python version, update
integ tests, add a note to the Lambda Runtime that it shouldn't be used
anymore.

Change all Python3.6 -> Python 3.9.

Fixes #20085.

----

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

# Conflicts:
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/manifest.json
#	packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/tree.json
#	packages/@aws-cdk/aws-lambda/test/function.test.ts
#	packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/aws-cdk-lambda-runtime-inlinecode.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/awsstepfunctionstasksemrcontainersstartjobrunintegtestawscdkawseksKubectlProviderC26A0FC7.nested.template.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/manifest.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.integ.snapshot/tree.json
#	packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke-function.integ.snapshot/integ.json
#	packages/@aws-cdk/lambda-layer-awscli/test/awscli-layer.integ.snapshot/lambda-layer-awscli-integ-stack.template.json
mergify bot pushed a commit that referenced this pull request Jun 7, 2022
Move all automatic Custom Resources to the newest Python version, update
integ tests, add a note to the Lambda Runtime that it shouldn't be used
anymore.

Change all Python3.6 -> Python 3.9.

Fixes #20085.
This was referenced Jun 14, 2022
mergify bot added a commit that referenced this pull request Jun 14, 2022
See [CHANGELOG](https://github.com/aws/aws-cdk/blob/bump/1.160.0/CHANGELOG.md)

-------------------------

## [1.160.0](v1.159.0...v1.160.0) (2022-06-14)


### ⚠  Removal of Node 12

- Starting with this release, Node 12 is no longer supported and customers should upgrade to Node 14, 16, or 18.

### Features

* **cfnspec:** cloudformation spec v75.0.0 ([#20615](#20615)) ([0a13e09](0a13e09))


### Bug Fixes

* **lambda:** deprecate Python3.6 ([#19988](#19988)) ([9602229](9602229)), closes [#20085](#20085)


### Miscellaneous Chores

* **deps:** npm-check-updates && yarn upgrade  ([#20684](#20684)) ([e661fe9](e661fe9))
daschaa pushed a commit to daschaa/aws-cdk that referenced this pull request Jul 9, 2022
Move all automatic Custom Resources to the newest Python version, update
integ tests, add a note to the Lambda Runtime that it shouldn't be used
anymore.

Change all Python3.6 -> Python 3.9.

Fixes aws#20085.
@HBobertz HBobertz mentioned this pull request Nov 10, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(ecs): InstanceDrainHook is still using EOL python runtime
6 participants