Skip to content

refactor: Import upstream in as dependency and rework LocalStack extensions into modules#41

Closed
gregfurman wants to merge 8 commits into
localstackfrom
lambda-rie-v2
Closed

refactor: Import upstream in as dependency and rework LocalStack extensions into modules#41
gregfurman wants to merge 8 commits into
localstackfrom
lambda-rie-v2

Conversation

@gregfurman

@gregfurman gregfurman commented Jun 26, 2025

Copy link
Copy Markdown

Changes

  • Uses the replace directive to import in the upstream aws/aws-lambda-runtime-interface as a Golang package/dependency as opposed to relying on the fork relationship.
    • In go.mod: replace go.amzn.com => github.com/aws/aws-lambda-runtime-interface-emulator v0.0.0-20250423173140-3a0772eae98d (v0.0.0-20250423173140-3a0772eae98d is a SHA pointing to the latest tagged version).
  • Reworked LocalStack extension code into modules instead of all being in the main package.
  • All extension code now resides in internal/ so as to restrict it being imported outside of this repo.

TODO

  • Update documentation to remove references to the upstream where appropriate.

Related

Related to DRG-1

@gregfurman gregfurman self-assigned this Jun 26, 2025
@gregfurman gregfurman closed this Mar 20, 2026
joe4dev added a commit that referenced this pull request Jun 9, 2026
…s API

Ports the supervisor and events API from PR #41 to enable proper error
reporting when a Lambda runtime process exits unexpectedly (e.g. sys.exit()
or missing wrapper script), instead of LocalStack timing out with a generic
error.

- Add LocalStackSupervisor: wraps ProcessSupervisor, detects unexpected
  runtime-* process exits and emits SendFault(RuntimeExit) events
- Add LocalStackEventsAPI: wraps StandaloneEventsAPI, overrides SendFault
  to forward errors to LocalStack via SendStatus(error, ...)
- Wire both into SandboxBuilder via SetEventsAPI / SetSupervisor
- Refactor NewCustomInteropServer to accept a pre-created *LocalStackAdapter
  shared with the events API
- Improve SendInitErrorResponse: properly deserialises the payload, includes
  RequestId, and sends asynchronously (non-blocking)

Enables test_lambda_runtime_exit and test_lambda_runtime_wrapper_not_found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
joe4dev added a commit that referenced this pull request Jun 9, 2026
…s API

Ports the supervisor and events API from PR #41 to enable proper error
reporting when a Lambda runtime process exits unexpectedly (e.g. sys.exit()
or missing wrapper script), instead of LocalStack timing out with a generic
error.

- Add LocalStackSupervisor: wraps ProcessSupervisor, detects unexpected
  runtime-* process exits and emits SendFault(RuntimeExit) events
- Add LocalStackEventsAPI: wraps StandaloneEventsAPI, overrides SendFault
  to forward errors to LocalStack via SendStatus(error, ...)
- Wire both into SandboxBuilder via SetEventsAPI / SetSupervisor
- Refactor NewCustomInteropServer to accept a pre-created *LocalStackAdapter
  shared with the events API
- Improve SendInitErrorResponse: properly deserialises the payload, includes
  RequestId, and sends asynchronously (non-blocking)

Enables test_lambda_runtime_exit and test_lambda_runtime_wrapper_not_found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
joe4dev added a commit that referenced this pull request Jun 9, 2026
…s API

Ports the supervisor and events API from PR #41 to enable proper error
reporting when a Lambda runtime process exits unexpectedly (e.g. sys.exit()
or missing wrapper script), instead of LocalStack timing out with a generic
error.

- Add LocalStackSupervisor: wraps ProcessSupervisor, detects unexpected
  runtime-* process exits and emits SendFault(RuntimeExit) events
- Add LocalStackEventsAPI: wraps StandaloneEventsAPI, overrides SendFault
  to forward errors to LocalStack via SendStatus(error, ...)
- Wire both into SandboxBuilder via SetEventsAPI / SetSupervisor
- Refactor NewCustomInteropServer to accept a pre-created *LocalStackAdapter
  shared with the events API
- Improve SendInitErrorResponse: properly deserialises the payload, includes
  RequestId, and sends asynchronously (non-blocking)

Enables test_lambda_runtime_exit and test_lambda_runtime_wrapper_not_found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant