Skip to content

Commit a73d940

Browse files
Integrate upstream changes from develop (#135)
Brings the fork up to aws/aws-lambda-runtime-interface-emulator@3ccddd7 (Update from upstream - 2026-09-17), covering four upstream syncs: 3ccddd7 Update from upstream - 2026-09-17 (aws#189) c622c06 Update from upstream - 2026-08-25 (aws#187) ddf2bc4 Update from upstream - 2026-07-31 (aws#182) a0f264a chore: sync from internal (rie-private-to-public) (aws#181) The fork had been on develop@391c3f1 since April, and a0f264a is why this matters now: it makes raptor.Server.Shutdown drain in-flight responses via httpServer.Shutdown instead of calling httpServer.Close(), which severed connections whose handler was still writing. That race is what failed the weekly release twice -- as `Post ...: EOF` in TestRie_InvokeFatalError, and as a 10m package timeout in TestRie_InvokeWaitingForInitError, where the invoke goroutine's require.NoError skipped its un-deferred wg.Done() and deadlocked the package. Both tests are green on this merge: 0 failures in 40 runs of the package under -race, against 10/10 hangs before it. Conflicts, all in files we customize: go.mod Kept our go 1.27.1 directive over upstream's 1.26.6. Makefile Kept our GO_VERSION derived from go.mod, and the nojsonv2 GOEXPERIMENT export. check-binaries.yml Took upstream's switch from robinraju/release-downloader release.yml to `gh release download`, and from softprops/action-gh-release to `gh release create`; kept our Renovate action bumps (checkout/setup-python v7). release.yml's trailing context had already moved to upstream's shape, so keeping ours there would not have parsed. integ-tests.yml Version bumps only; kept ours. Note for the next integration: the previous one (#92) landed as a single squashed commit, so its upstream parent was lost and git computed the merge base as the Go 1.24 bump from 2025 -- 48 conflicts, 36 of them spurious add/add on files that were already identical. This was resolved against the true base (391c3f1) using a local `git replace --graft`, giving the 5 real conflicts above. Merging this one with --ff, per README-LOCALSTACK step 7, records the upstream parent and stops the next integration needing that.
2 parents b409be6 + 3ccddd7 commit a73d940

46 files changed

Lines changed: 555 additions & 214 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!--
2+
Thank you for taking the time to send this.
3+
4+
Please read this first: this repository is generated from an internal AWS source of truth, so we
5+
cannot merge pull requests into it directly. We still want your proposal. Yours will be read and
6+
treated as a reference for the change you are describing, and if we adopt your solution we make the
7+
corresponding change internally and credit you in the release notes for the version that ships it.
8+
9+
If what you want is a behaviour change rather than a specific patch, an issue describing your use
10+
case is more effective than a pull request. See CONTRIBUTING.md.
11+
-->
12+
13+
#### What does this change do?
14+
15+
16+
#### Why is it needed? What is the use case?
17+
18+
19+
#### How did you test it?
20+
21+
<!-- Local tests pass through `make integ-tests-and-compile`. -->
22+
23+
24+
#### Checklist
25+
26+
- [ ] I have read [CONTRIBUTING.md](../CONTRIBUTING.md) and understand this pull request will be used
27+
as a reference rather than merged directly
28+
- [ ] I opened an issue first if this is a significant change
29+
- [ ] This change is limited to the behaviour described above, with no unrelated reformatting
30+
- [ ] Local tests pass through `make integ-tests-and-compile`
31+
32+
By submitting this pull request, I confirm that my contribution is made under the terms of the
33+
[Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).

‎.github/workflows/check-binaries.yml‎

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
with:
2424
ref: main
2525
- name: Download latest release
26-
uses: robinraju/release-downloader@v1.13
27-
with:
28-
latest: true
29-
fileName: 'aws-lambda-rie*'
30-
out-file-path: "bin"
26+
run: |
27+
mkdir -p bin
28+
gh release download --pattern 'aws-lambda-rie*' --dir bin
29+
env:
30+
GH_TOKEN: ${{ github.token }}
3131
- name: Run check for vulnerabilities
3232
id: check-binaries
3333
run: |
@@ -61,25 +61,29 @@ jobs:
6161
name: Save outputs for the check with the latest build
6262
id: save-new-version
6363
run: |
64-
if [ "${{ steps.check-new-version.outcome }}" == "failure" ]; then
64+
if [ "${CHECK_OUTCOME}" == "failure" ]; then
6565
fixed="No"
6666
else
6767
fixed="Yes"
6868
fi
6969
echo "fixed=$fixed" >> "$GITHUB_OUTPUT"
70+
env:
71+
CHECK_OUTCOME: ${{ steps.check-new-version.outcome }}
7072
- if: always() && steps.save-output.outputs.report_contents
7173
name: Create GitHub Issue indicating vulnerabilities
7274
id: create-issue
73-
uses: dacbd/create-issue-action@main
74-
with:
75-
token: ${{ github.token }}
76-
title: |
77-
CVEs found in latest RIE release
78-
body: |
79-
### CVEs found in latest RIE release
80-
```
81-
${{ steps.save-output.outputs.report_contents }}
82-
```
83-
84-
#### Are these resolved by building with the latest patch version of Go (${{ steps.check-new-version.outputs.latest_version }})?:
85-
> **${{ steps.save-new-version.outputs.fixed }}**
75+
run: |
76+
gh issue create \
77+
--title "CVEs found in latest RIE release" \
78+
--body "### CVEs found in latest RIE release
79+
\`\`\`
80+
${REPORT_CONTENTS}
81+
\`\`\`
82+
83+
#### Are these resolved by building with the latest patch version of Go (${LATEST_VERSION})?:
84+
> **${FIXED}**"
85+
env:
86+
GH_TOKEN: ${{ github.token }}
87+
REPORT_CONTENTS: ${{ steps.save-output.outputs.report_contents }}
88+
LATEST_VERSION: ${{ steps.check-new-version.outputs.latest_version }}
89+
FIXED: ${{ steps.save-new-version.outputs.fixed }}

‎.github/workflows/integ-tests.yml‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ name: Run Integration Tests
88
jobs:
99
go-tests:
1010
runs-on: ubuntu-latest
11-
environment:
12-
name: integ-tests
1311
steps:
1412
- uses: actions/checkout@v7
1513
- name: run go tests
1614
run: make tests-with-docker
1715
integ-tests-x86:
1816
runs-on: ubuntu-latest
19-
environment:
20-
name: integ-tests
2117
steps:
2218
- uses: actions/checkout@v7
2319
- uses: actions/setup-python@v7
@@ -27,8 +23,6 @@ jobs:
2723
run: make integ-tests-with-docker-x86-64
2824
integ-tests-arm64:
2925
runs-on: ubuntu-latest
30-
environment:
31-
name: integ-tests
3226
steps:
3327
- uses: actions/checkout@v7
3428
- uses: actions/setup-python@v7
@@ -38,8 +32,6 @@ jobs:
3832
run: make integ-tests-with-docker-arm64
3933
integ-tests-old:
4034
runs-on: ubuntu-latest
41-
environment:
42-
name: integ-tests
4335
steps:
4436
- uses: actions/checkout@v7
4537
- uses: actions/setup-python@v7

‎.github/workflows/release.yml‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ jobs:
3333
make tests-with-docker
3434
make integ-tests
3535
- name: Release
36-
uses: softprops/action-gh-release@v3
37-
with:
38-
name: Release ${{ github.event.inputs.releaseVersion }}
39-
tag_name: v${{ github.event.inputs.releaseVersion }}
40-
body: ${{ github.event.inputs.releaseBody }}
41-
files: |
42-
bin/aws-lambda-rie
43-
bin/aws-lambda-rie-arm64
36+
run: |
37+
gh release create "v${RELEASE_VERSION}" \
38+
--title "Release ${RELEASE_VERSION}" \
39+
--notes "${RELEASE_BODY}" \
40+
bin/aws-lambda-rie \
41+
bin/aws-lambda-rie-arm64 \
4442
bin/aws-lambda-rie-x86_64
43+
env:
44+
GH_TOKEN: ${{ github.token }}
45+
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
46+
RELEASE_BODY: ${{ github.event.inputs.releaseBody }}

‎.github/workflows/validate-branch-into-main.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check source branch
13+
env:
14+
SOURCE_BRANCH: ${{ github.head_ref }}
1315
run: |
14-
SOURCE_BRANCH="${{ github.head_ref }}"
1516
if [[ "$SOURCE_BRANCH" != "develop" ]]; then
1617
echo "Error: Only pull requests from develop branch are allowed into main"
1718
echo "Current source branch ($SOURCE_BRANCH)."

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ tags
99
.idea
1010
.DS_Store
1111
.venv
12+
build.log

‎CONTRIBUTING.md‎

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ documentation, we greatly value feedback and contributions from our community.
66
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
77
information to effectively respond to your bug report or contribution.
88

9+
**Please note:** this repository is generated from an internal AWS source of truth, which means we are unable to merge
10+
pull requests into it directly. We very much still want your input -- see
11+
[How we handle contributions](#how-we-handle-contributions) for what happens to an issue or pull request you open, and
12+
how you get credit for a change we adopt.
13+
914

1015
## Reporting Bugs/Feature Requests
1116

12-
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
17+
We welcome you to use the GitHub issue tracker to report bugs or suggest features. Issues are the most effective way to
18+
reach us: a feature request that describes your use case can be picked up and implemented, whereas a pull request cannot
19+
be merged as-is.
1320

1421
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
1522
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
@@ -20,25 +27,34 @@ reported the issue. Please try to include as much information as you can. Detail
2027
* Anything unusual about your environment or deployment
2128

2229

23-
## Contributing via Pull Requests
24-
This repository contains the source code and examples for the Runtime Interface Emulator. We will accept pull requests on documentation, examples, bug fixes and the Dockerfiles. We will also accept pull requests, issues and feedback on improvements to the Runtime Interface Emulator. However, our priority will be to maintain fidelity with AWS Lambda’s Runtime Interface on the cloud.
30+
## How we handle contributions
31+
32+
This repository contains the source code and examples for the Runtime Interface Emulator. The code here is generated from
33+
an internal AWS repository, which is the source of truth, and changes flow outward from there. Because of that we cannot
34+
merge a pull request into this repository, even one we agree with.
2535

26-
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
36+
That does not mean we don't want it. Here is what each kind of contribution gets you:
2737

28-
1. You are working against the latest source on the *main* branch.
29-
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
30-
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
38+
* **Feature requests and bug reports are welcome, and are the most useful thing you can send us.** Open an issue
39+
describing the behaviour you want and the use case behind it. Our priority is maintaining fidelity with AWS Lambda's
40+
Runtime Interface in the cloud, so a clear use case is what lets us weigh a change against that.
41+
* **Pull requests are welcome as a reference.** We read them, and a working patch is often the clearest way to explain a
42+
proposal. It will not be merged directly. If we adopt your solution, we make the corresponding change in the internal
43+
repository, and it reaches this repository through the next sync.
44+
* **If we adopt your change, we credit you in the release notes** for the version that ships it.
3145

32-
To send us a pull request, please:
46+
So that we can act on a pull request, please:
3347

34-
1. Fork the repository.
35-
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
36-
3. Ensure local tests pass through `make integ-tests-and-compile`
37-
4. Commit to your fork using clear commit messages.
38-
5. Send us a pull request, answering any default questions in the pull request interface.
48+
1. Open an issue first to discuss any significant work -- we would hate for your time to be wasted on something we
49+
cannot take.
50+
2. Work against the latest source on the *main* branch.
51+
3. Check existing open, and recently closed, pull requests and issues to make sure someone else hasn't raised it already.
52+
4. Focus on the specific change you are proposing. If you also reformat all the code, it will be hard for us to see what
53+
you are actually suggesting.
54+
5. Ensure local tests pass through `make integ-tests-and-compile`.
3955
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
4056

41-
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
57+
GitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
4258
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
4359

4460

@@ -58,4 +74,5 @@ If you discover a potential security issue in this project we ask that you notif
5874

5975
## Licensing
6076

61-
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
77+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your
78+
contribution, including for a pull request we adopt rather than merge.

‎README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Lambda’s orchestrator, or security and authentication configurations. You can
2525
* [To test an image without adding RIE to the image](#to-test-an-image-without-adding-rie-to-the-image)
2626
* [How to configure](#how-to-configure)
2727
* [Level of support](#level-of-support)
28+
* [Contributing](#contributing)
2829
* [Security](#security)
2930
* [License](#license)
3031

@@ -187,6 +188,18 @@ configurations that will not be emulated by this component.
187188
* The component does _not_ support X-ray and other Lambda integrations locally.
188189
* The component supports only Linux, for x86-64 and arm64 architectures.
189190
191+
## Contributing
192+
193+
We welcome feature requests and bug reports through the GitHub issue tracker, and they are the most effective way to
194+
reach us.
195+
196+
This repository is generated from an internal AWS source of truth, so we are unable to merge pull requests into it
197+
directly. You are still welcome to open one: we read them, and a working patch is often the clearest way to explain a
198+
proposal. It is treated as a reference rather than something we merge, and if we adopt your solution we make the change
199+
in the internal repository and credit you in the release notes for the version that ships it.
200+
201+
See [CONTRIBUTING](CONTRIBUTING.md) for details.
202+
190203
## Security
191204
192205
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

‎internal/lambda-managed-instances/aws-lambda-rie/internal/app_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func TestApp_ServeHTTP(t *testing.T) {
7979
defer mockApp.AssertExpectations(t)
8080
mockApp.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(tt.initResponse)
8181
if tt.initResponse == nil {
82-
mockApp.On("Invoke", mock.Anything, mock.Anything, mock.Anything).Return(tt.invokeErr, tt.responseSent)
82+
mockApp.On("Invoke", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.invokeErr, tt.responseSent, false)
8383
}
8484

8585
initMsg := intmodel.InitRequestMessage{

‎internal/lambda-managed-instances/aws-lambda-rie/internal/invoke/rie_invoke_request.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type rieInvokeRequest struct {
4040
cognitoIdentityPoolId string
4141
clientContext string
4242
responseMode string
43+
internalInvocationID string
4344

4445
functionVersionID string
4546
}
@@ -98,6 +99,7 @@ func NewRieInvokeRequest(request *http.Request, writer http.ResponseWriter) (*ri
9899
cognitoIdentityPoolId: cognitoIdentityPoolId,
99100
clientContext: clientContext,
100101
responseMode: request.Header.Get(invoke.ResponseModeHeader),
102+
internalInvocationID: uuid.New().String(),
101103
}
102104

103105
return req, nil
@@ -184,3 +186,7 @@ func (r *rieInvokeRequest) UpdateFromInitData(initData interop.InitStaticDataPro
184186
func (r *rieInvokeRequest) FunctionVersionID() string {
185187
return r.functionVersionID
186188
}
189+
190+
func (r *rieInvokeRequest) InternalInvocationID() string {
191+
return r.internalInvocationID
192+
}

0 commit comments

Comments
 (0)