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