FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: Integrate with upstream by gregfurman · Pull Request #62 · localstack/lambda-runtime-init · GitHub

feat: Integrate with upstream - #62

Merged
gregfurman merged 9 commits into
localstackfrom
integrate/09-12-25
Dec 15, 2025
Merged

feat: Integrate with upstream#62
gregfurman merged 9 commits into
localstackfrom
integrate/09-12-25

Conversation

Copy link
Copy Markdown

Motivation

There are several upstream changes that our fork had not yet pulled in. This PR cherry picks the relevant upstream changes, namely the introduction of the internal package, and reworks our repo to reflect this.

Changes

  • Cherry picks relevent commits from 85e5302..HEAD from upstream.
  • Moves over our repo structure to use the new internal approach, as well as using the AWS provided InitHandler in favor of our own in cmd/awsutils.
  • Reverts error message changes that break parity with AWS.

Relevant items

  • Completes DRG-241

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I added some questions related to our changes. Thanks for separating the LS changes.

I haven't looked into the big upstream changes coming from aws#158
Could you give us (including @dfangl ) a walkthrough to help understanding the key parts of these changes and their implications for LocalStack?

"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/fatalerror"
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/interop"
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/testdata"
"github.com/stretchr/testify/assert"

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: Is this change necessary? I guess it follows alphabetical import sorting.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Go has some pretty opinionated formatting 🤷 Unsure why it never kicked in for the original changes.

Comment thread cmd/localstack/custom_interop.go Outdated
// The InvokeRequest is sent by LocalStack to trigger an invocation
type InvokeRequest struct {
InvokeId string `json:"invoke-id"`
InvokeId string `json:"request-id"`

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I like that we fixed this inconsistent naming.

❓ Are we safe to ship this without breaking K8 images, which are not directly tied to LocalStack versions?
/cc @dfangl

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'll make a corresponding change in LocalStack for this once the latest RIE changes are shipped. Then, in a single PR, we switch over RIE in addition to changing the param on invoke request.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you for separating that breaking change 👍

I think we need DRG-327 to ship this safely.

Comment thread cmd/localstack/awsutil.go
"strings"
"time"

"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/interop"

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good catch 👍

So we basically need to change the imports to our fork instead of using upstream via go.amzn.com. I guess these imports might be a frequent area of conflict, so it's worth documenting the rationale in our LocalStack readme.

Comment thread go.mod Outdated
github.com/shirou/gopsutil v2.19.10+incompatible
github.com/aws/aws-lambda-go v1.46.0
github.com/go-chi/chi v1.5.5
github.com/go-chi/chi/v5 v5.2.2

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

❓ Why are both chi and chi/v5 gone here?

Comment thread cmd/localstack/main.go
// start runtime init. It is important to start `InitHandler` synchronously because we need to ensure the
// notification channels and status fields are properly initialized before `AwaitInitialized`
log.Debugln("Starting runtime init.")
InitHandler(sandbox.LambdaInvokeAPI(), GetEnvOrDie("AWS_LAMBDA_FUNCTION_VERSION"), int64(invokeTimeoutSeconds), bootstrap, lsOpts.AccountId) // TODO: replace this with a custom init

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

❓ Why is lsOpts.AccountId not necessary anymore?

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you for integrating these big upstream changes and separating our minimal changes nicely 🚀

Please trigger all relevant pipelines (LS & LS Pro without test selection) before shipping this change in LocalStack to catch potential regressions early 🙏

gregfurman merged commit eb45a2c into localstack Dec 15, 2025
2 checks passed
gregfurman deleted the integrate/09-12-25 branch December 15, 2025 15:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

6 participants


Back | FazBrowse Home | New Git URL