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: remove python3.7 lambda support #6689

Merged
merged 47 commits into from
Feb 21, 2024
Merged

fix: remove python3.7 lambda support #6689

merged 47 commits into from
Feb 21, 2024

Conversation

mndeveci
Copy link
Contributor

@mndeveci mndeveci commented Feb 14, 2024

Which issue(s) does this change fix?

#6298 (python3.7)

Why is this change necessary?

AWS Lambda no longer supports python3.7 as runtime.

How does it address the issue?

Removes ptyhon3.7 support and adds runtime to the deprecated runtimes list.

This also updates lots of integration test with following logic;

  • For any python parameterized tests, it removes python3.7 from that list (also added some missing newer python runtimes in couple of places).
  • For any generic test (like testing parallel builds or de-duped builds), it updates to use python3.11 rather than python3.7 (we can't use python3.12 since it has some issues with Windows integration test environment)

Test runs;

What side effects does this change have?

N/A

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

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 area/local/start-api sam local start-api command area/build sam build command area/local/invoke sam local invoke command area/local/start-invoke pr/internal labels Feb 14, 2024
mndeveci and others added 24 commits February 14, 2024 12:02
…t-json-report-wip (#6648)

* chore(deps-dev): bump pytest-metadata in /requirements

Bumps [pytest-metadata](https://github.com/pytest-dev/pytest-metadata) from 2.0.4 to 3.1.0.
- [Changelog](https://github.com/pytest-dev/pytest-metadata/blob/master/CHANGES.rst)
- [Commits](pytest-dev/pytest-metadata@v2.0.4...3.1.0)

---
updated-dependencies:
- dependency-name: pytest-metadata
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump pytest to v8 and switch json-report to fork

* Added comment

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: Deprecate Nodejs12 and Nodejs14

* Make Windows container tests Node18
* Remove ruby2.7 support

* Remove ruby2.7 build cmd integ tests

* Update validate integ test to include ruby3.2
* chore(deps): bump pydantic from 2.6.0 to 2.6.1 in /requirements

Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](pydantic/pydantic@v2.6.0...v2.6.1)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update reproducibles: update-reproducible-linux-reqs

* Update reproducibles: update-reproducible-mac-reqs

* Update reproducibles: update-reproducible-win-reqs

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Bumps the boto group in /requirements with 4 updates: [boto3](https://github.com/boto/boto3), [boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]](https://github.com/youtype/mypy_boto3_builder), [botocore](https://github.com/boto/botocore) and [botocore-stubs](https://github.com/youtype/botocore-stubs).


Updates `boto3` from 1.34.32 to 1.34.39
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.34.32...1.34.39)

Updates `boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]` from 1.34.32 to 1.34.39
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `botocore` from 1.34.32 to 1.34.39
- [Changelog](https://github.com/boto/botocore/blob/develop/CHANGELOG.rst)
- [Commits](boto/botocore@1.34.32...1.34.39)

Updates `botocore-stubs` from 1.34.32 to 1.34.39
- [Release notes](https://github.com/youtype/botocore-stubs/releases)
- [Commits](https://github.com/youtype/botocore-stubs/commits)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore-stubs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tzdata](https://github.com/python/tzdata) from 2023.4 to 2024.1.
- [Release notes](https://github.com/python/tzdata/releases)
- [Changelog](https://github.com/python/tzdata/blob/master/NEWS.md)
- [Commits](python/tzdata@2023.4...2024.1)

---
updated-dependencies:
- dependency-name: tzdata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint) from 0.85.0 to 0.85.1.
- [Release notes](https://github.com/aws-cloudformation/cfn-python-lint/releases)
- [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md)
- [Commits](aws-cloudformation/cfn-lint@v0.85.0...v0.85.1)

---
updated-dependencies:
- dependency-name: cfn-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
)

Bumps [markupsafe](https://github.com/pallets/markupsafe) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/pallets/markupsafe/releases)
- [Changelog](https://github.com/pallets/markupsafe/blob/main/CHANGES.rst)
- [Commits](pallets/markupsafe@2.1.4...2.1.5)

---
updated-dependencies:
- dependency-name: markupsafe
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.2.0...v0.2.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot bot and others added 16 commits February 14, 2024 17:48
Bumps [flask](https://github.com/pallets/flask) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](pallets/flask@3.0.1...3.0.2)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…6681)

Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](pyinstaller/pyinstaller@v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest-metadata](https://github.com/pytest-dev/pytest-metadata) from 3.1.0 to 3.1.1.
- [Changelog](https://github.com/pytest-dev/pytest-metadata/blob/master/CHANGES.rst)
- [Commits](pytest-dev/pytest-metadata@3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: pytest-metadata
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#6683)

Bumps [python-slugify](https://github.com/un33k/python-slugify) from 8.0.3 to 8.0.4.
- [Changelog](https://github.com/un33k/python-slugify/blob/master/CHANGELOG.md)
- [Commits](un33k/python-slugify@v8.0.3...v8.0.4)

---
updated-dependencies:
- dependency-name: python-slugify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the boto group in /requirements with 4 updates: [boto3](https://github.com/boto/boto3), [boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]](https://github.com/youtype/mypy_boto3_builder), [botocore](https://github.com/boto/botocore) and [botocore-stubs](https://github.com/youtype/botocore-stubs).


Updates `boto3` from 1.34.39 to 1.34.41
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.34.39...1.34.41)

Updates `boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]` from 1.34.39 to 1.34.41
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `botocore` from 1.34.39 to 1.34.41
- [Changelog](https://github.com/boto/botocore/blob/develop/CHANGELOG.rst)
- [Commits](boto/botocore@1.34.39...1.34.41)

Updates `botocore-stubs` from 1.34.39 to 1.34.41
- [Release notes](https://github.com/youtype/botocore-stubs/releases)
- [Commits](https://github.com/youtype/botocore-stubs/commits)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore-stubs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rpds-py](https://github.com/crate-py/rpds) from 0.17.1 to 0.18.0.
- [Release notes](https://github.com/crate-py/rpds/releases)
- [Commits](crate-py/rpds@v0.17.1...v0.18.0)

---
updated-dependencies:
- dependency-name: rpds-py
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…6685)

Bumps [black](https://github.com/psf/black) from 24.1.1 to 24.2.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@24.1.1...24.2.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…6684)

Bumps [setuptools](https://github.com/pypa/setuptools) from 69.0.3 to 69.1.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](pypa/setuptools@v69.0.3...v69.1.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Comment on lines +260 to +261
self.assertEqual(response_data.get("errorMessage"), "Lambda is raising an exception")
self.assertEqual(response_data.get("errorType"), "Exception")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Error returned from newer python runtime is different than 3.7

@mndeveci mndeveci marked this pull request as ready for review February 20, 2024 23:18
@mndeveci mndeveci requested a review from a team as a code owner February 20, 2024 23:18
@mndeveci mndeveci requested review from bentvelj and hnnasit February 20, 2024 23:18
Copy link
Contributor

@mildaniel mildaniel left a comment

Choose a reason for hiding this comment

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

Tiny comments, not blocking

@@ -9,11 +9,14 @@
"nodejs6.10",
"nodejs8.10",
"nodejs10.x",
"nodejs12.x",
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding these 😌

@@ -1838,7 +1850,7 @@ def test_build_function_and_layer(self, runtime, use_container):
self.verify_docker_container_cleanedup(runtime)
self.verify_pulled_image(runtime)

@parameterized.expand([("python3.7", False), ("python3.7", "use_container")])
@parameterized.expand([("python3.12", False), ("python3.12", "use_container")])
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for some we bump to 3.11 and for others to 3.12?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For most of them, I've used 3.11, for this instance, this whole class is skipped for Windows so that is why I was able to use 3.12.

@hawflau hawflau added this pull request to the merge queue Feb 21, 2024
Merged via the queue into develop with commit 8228acd Feb 21, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command area/local/invoke sam local invoke command area/local/start-api sam local start-api command area/local/start-invoke pr/internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants