Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Integrate lambda init upstream changes#9378

Merged
joe4dev merged 4 commits into
masterfrom
integrate-lambda-init-upstream-changes
Oct 18, 2023
Merged

Integrate lambda init upstream changes#9378
joe4dev merged 4 commits into
masterfrom
integrate-lambda-init-upstream-changes

Conversation

@joe4dev

@joe4dev joe4dev commented Oct 18, 2023

Copy link
Copy Markdown
Member

Depends on localstack/lambda-runtime-init#24

Motivation

The official AWS lambda-runtime-init received some upstream updates (typically merged in big blobs from their internal repository). We should update our customized localstack version to support the latest features (e.g., response streaming) and updates (e.g., the new Golang version).

See localstack/lambda-runtime-init#24

Changes

  • Bump Lambda init version
  • Improve the request_id test to cover a regression where the ID didn't match
  • Extract lambda_report_logs transformers
  • Update logs snapshots to yield individual lines for easier visual and more accurate matching (still missing selective list skip 😿 )
  • Standardize Lambda commons test get_arch

Testing

See localstack/lambda-runtime-init#24

TODO

  • Wait for full CI run and then follow up on potential issues

We also use this in other parts of the test suite.

This also makes it easier to force executing tests on ARM machines by returning "x86_64" in `get_arch`
rather than modifying many test conditions.
@joe4dev joe4dev added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Oct 18, 2023
@joe4dev joe4dev self-assigned this Oct 18, 2023
@github-actions

github-actions Bot commented Oct 18, 2023

Copy link
Copy Markdown

LocalStack Community integration with Pro

       2 files         2 suites   1h 9m 57s ⏱️
2 257 tests 1 682 ✔️ 575 💤 0
2 258 runs  1 682 ✔️ 576 💤 0

Results for commit 99597d1.

♻️ This comment has been updated with latest results.

@joe4dev

joe4dev commented Oct 18, 2023

Copy link
Copy Markdown
Member Author

I kinda expected some failing tests after local testing but it appears these were mostly limitations of running on macOS and ARM 🥲 😎


Logging on default level didn't change (nit: was hoping to get rid of the first warning message "Cannot list external agents" but I guess we would need to create /opt/extensions):

2023-10-18 12:55:56 time="2023-10-18T10:55:56Z" level=warning msg="Cannot list external agents" func=go.amzn.com/lambda/agents.ListExternalAgentPaths file="/home/runner/work/lambda-runtime-init/lambda-runtime-init/lambda/agents/agent.go:24" error="open /opt/extensions: no such file or directory"
2023-10-18 12:55:58 2023-10-18T10:55:58.449Z    b5e96b39-ab8c-4dcb-bdf3-705a63905da9    INFO    {}
2023-10-18 12:55:58 time="2023-10-18T10:55:58Z" level=warning msg="Reset initiated: SandboxTerminated" func=go.amzn.com/lambda/rapid.handleReset file="/home/runner/work/lambda-runtime-init/lambda-runtime-init/lambda/rapid/start.go:720"

@joe4dev
joe4dev marked this pull request as ready for review October 18, 2023 11:00

@dfangl dfangl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, we should fix the missing init duration soon though!

@joe4dev

joe4dev commented Oct 18, 2023

Copy link
Copy Markdown
Member Author

LGTM, we should fix the missing init duration soon though!

fully agree. Too bad we need to skip useful test snapshots just because of this missing parity. It should be quite easy because there are examples for the calculations; just need to tackle it :)

@joe4dev
joe4dev merged commit ca62284 into master Oct 18, 2023
@joe4dev
joe4dev deleted the integrate-lambda-init-upstream-changes branch October 18, 2023 19:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

2 participants