Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add new lambda runtimes and more parity fixes #9697

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

Merged
merged 12 commits into from
Nov 23, 2023
Merged

Conversation

joe4dev
Copy link
Member

@joe4dev joe4dev commented Nov 20, 2023

Superseeds #9659 (Node 20) and #9685 (Java 20)
Big kudos to our community members @ataylorme and @eddumelendez for your initiative and efforts πŸ‘πŸ‘πŸ‘ πŸ₯³

Motivation

AWS recently announced new Lambda runtimes (based on AL2023 such as Nodejs 20.x) and our currently supported runtimes have become outdated. Furthermore, more runtime changes including deprecations and new runtimes are expected to come in the future.

Updating runtimes is currently too cumbersome and many effects (both from us and contributors) are incomplete and need to be followed up by bugfixes.

Changes

This PR fixes AWS-parity for Lambda and updates many snapshots:

  • Add the new Lambda runtimes nodejs20.x, python3.12 (not yet in the docs but already live), java21,
    provided.al2023 (see https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html)
  • Centralize everything related to Lambda runtimes to simplify future updates
  • Add the deprecated runtimes nodejs12.x and dotnetcore3.1 to a DEPRECATED_RUNTIMES list but keep them available in LocalStack for now. We log a deprecation warning upon creating or updating deprecated runtimes.
  • Add a new marker lambda_runtime_update to filter test cases related to Lambda runtime updates for easier snapshot updates. This allows us to keep the tests grouped logically and easily update snapshots related to runtime updates.
  • Update many Lambda snapshots
  • Fix new AWS behavior enforcing stricter checks for large ZIP files (see RequestEntityTooLargeException) and a new higher limit for request size. Like in AWS, users will see the clearer zipped file size exception rather than the more confusing request size too large exception.
  • Fix updated validations
  • Add skip_snapshot_verify for some new AWS features (e.g. InvokeMode)
  • Fix timeout against AWS for test_vpc_config

Idea for v4

Having an opt-in flag such as LAMBDA_EXTENDED_RUNTIMES would enable deprecated as well as upcoming preview runtimes while maintaining full AWS parity.

TODO

What's left to do:

  • Follow up failing tests after full test run
  • Greenify ext PR

Follow Ups

@joe4dev joe4dev added the semver: patch Non-breaking changes which can be included in patch releases label Nov 20, 2023
@joe4dev joe4dev added this to the 3.0 milestone Nov 20, 2023
@joe4dev joe4dev self-assigned this Nov 20, 2023
Copy link

github-actions bot commented Nov 20, 2023

LocalStack Community integration with Pro

βŸβ€„β€ˆβŸβ€„βŸβ€„2 files  Β±βŸβ€„0β€‚β€ƒβŸβ€„β€ˆβŸβ€„βŸβ€„2 suites  Β±0   1h 7m 5s ⏱️ +59s
2β€ˆ355 tests +25  2β€ˆ040 βœ”οΈ +10  315 πŸ’€ +15  0 ❌ Β±0 
2β€ˆ356 runs  +25  2β€ˆ040 βœ”οΈ +10  316 πŸ’€ +15  0 ❌ Β±0 

Results for commit 7431537. ± Comparison against base commit f354fd4.

♻️ This comment has been updated with latest results.

@coveralls
Copy link

coveralls commented Nov 21, 2023

Coverage Status

coverage: 83.997%. remained the same
when pulling 7431537 on add-new-lambda-runtimes
into f354fd4 on master.

@dfangl dfangl modified the milestones: 3.0, 3.0.1 Nov 21, 2023
@joe4dev joe4dev force-pushed the add-new-lambda-runtimes branch from 7f440ef to d51147c Compare November 21, 2023 20:30
@joe4dev joe4dev marked this pull request as ready for review November 21, 2023 21:58
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

LGTM, great set of changes! I think the marker for tests that need to be run for an update is a great idea!

"recorded-content": {
"tag_lambda_invalidarn": {
"Error": {
"Code": "ValidationException",
"Message": "1 validation error detected: Value 'arn:aws:something' at 'resource' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?"
"Message": "1 validation error detected: Value 'arn:aws:something' at 'resource' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:(function:[a-zA-Z0-9-_]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?|layer:[a-zA-Z0-9-_]+)"
Copy link
Member Author

@joe4dev joe4dev Nov 22, 2023

Choose a reason for hiding this comment

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

I didn't look into the implications of the added layer part for the implementation here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhancement request: add support for lambda runtime nodejs20.x
3 participants