Skip to content

WIP: feat(lambda): Use Lambda Runtime Emulator Interface v2 #12736

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

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

gregfurman
Copy link
Contributor

Motivation

Currently a WIP. This PR was created to trigger a CI/CD run with the new Lambda RIE v2 enabled by default.

Changes

@gregfurman gregfurman self-assigned this Jun 10, 2025
@gregfurman gregfurman added aws:lambda AWS Lambda semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Jun 10, 2025
Copy link

github-actions bot commented Jun 10, 2025

Test Results - Preflight, Unit

0 tests   - 21 727   0 ✅  - 20 070   0s ⏱️ - 6m 19s
0 suites  -      1   0 💤  -  1 657 
0 files    -      1   0 ❌ ±     0 

Results for commit f79554a. ± Comparison against base commit 5783fa3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

Test Results (MA/MR) - Preflight, Unit

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit f79554a.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 9s ⏱️ -2s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 88b413e. ± Comparison against base commit 3a5f08b.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

Test Results (amd64, MA/MR) - Acceptance

7 tests   5 ✅  3m 12s ⏱️
1 suites  2 💤
1 files    0 ❌

Results for commit 88b413e.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

Test Results (MA/MR) - Alternative Providers

987 tests   584 ✅  23m 18s ⏱️
  4 suites  403 💤
  4 files      0 ❌

Results for commit 88b413e.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

Test Results - Alternative Providers

987 tests   584 ✅  22m 18s ⏱️
  4 suites  403 💤
  4 files      0 ❌

Results for commit 88b413e.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

Test Results (amd64, MA/MR) - Integration, Bootstrap

    5 files      5 suites   2h 21m 12s ⏱️
5 229 tests 4 303 ✅ 924 💤 2 ❌
5 235 runs  4 303 ✅ 930 💤 2 ❌

For more details on these failures, see this check.

Results for commit 88b413e.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 25m 50s ⏱️
5 229 tests 4 303 ✅ 924 💤 2 ❌
5 235 runs  4 303 ✅ 930 💤 2 ❌

For more details on these failures, see this check.

Results for commit 88b413e.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2025

LocalStack Community integration with Pro

 2 files  ±    0  2 suites  ±0   40s ⏱️ - 1h 42m 14s
27 tests  - 4 869  0 ✅  - 4 122  1 💤  - 773  0 ❌ ±0  26 🔥 +26 
54 runs   - 4 844  0 ✅  - 4 122  2 💤  - 774  0 ❌ ±0  52 🔥 +52 

For more details on these errors, see this check.

Results for commit f79554a. ± Comparison against base commit 5783fa3.

This pull request removes 4894 and adds 25 tests. Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…
tests.aws.services.apigateway
tests.aws.services.dynamodb.test_dynamodb
tests.aws.services.events.test_archive_and_replay
tests.aws.services.events.test_events
tests.aws.services.events.test_events_cross_account_region
tests.aws.services.events.test_events_inputs
tests.aws.services.events.test_events_tags
tests.aws.services.events.test_events_targets
tests.aws.services.events.test_x_ray_trace_propagation
tests.aws.services.kinesis.test_kinesis
…

♻️ This comment has been updated with latest results.

Comment on lines +3735 to +3740
"errorMessage": "[Errno 13] Permission denied: '/proc/1/environ'",
"errorType": "PermissionError",
"requestId": "<uuid:2>",
"stackTrace": [
" File \"/var/task/handler.py\", line 3, in handler\n with open(f\"/proc/{pid}/environ\", mode=\"rt\") as f:\n"
]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dfangl @joe4dev Seems like this test now expects a permissions error 🤔 Any pointers on how we should be configuring the user permissions when accessing the lambda FS? We currently set the following:

https://github.com/localstack/lambda-runtime-init/blob/9be92e099e99c9973f2e1730d1af6d4ffd769bb2/cmd/localstack/main.go#L155-L169

Copy link
Member

Choose a reason for hiding this comment

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

Can we parity-test/inspect this, or does the permission prohibit that?
If not, @dfangl might have a better guess. Maybe, try 600 🤷‍♂️

Copy link
Member

Choose a reason for hiding this comment

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

I think the tests makes no longer sense then - it was mean to introspect the environment of the init process, if that is no longer possible in AWS, there is no real point (although we could try to hide it in our containers as well, I don't necessarily see this as a priority)

@gregfurman gregfurman added this to the Playground milestone Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:lambda AWS Lambda semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants