Skip to content

Commit 49ba181

Browse files
committed
Remove build
1 parent a860f39 commit 49ba181

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

build/aws-lambda-rie-amd64

-17.2 MB
Binary file not shown.

build/aws-lambda-rie-arm64

-16.6 MB
Binary file not shown.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ require (
99
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575
1010
github.com/fsnotify/fsnotify v1.6.0
1111
github.com/go-chi/chi v1.5.5
12+
github.com/google/uuid v1.6.0
1213
github.com/shirou/gopsutil v2.19.10+incompatible
1314
github.com/sirupsen/logrus v1.9.3
1415
go.amzn.com v0.0.0-00010101000000-000000000000
16+
golang.org/x/sync v0.15.0
1517
golang.org/x/sys v0.31.0
1618
)
1719

@@ -30,10 +32,8 @@ require (
3032
github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect
3133
github.com/aws/smithy-go v1.22.2 // indirect
3234
github.com/go-ole/go-ole v1.2.4 // indirect
33-
github.com/google/uuid v1.6.0 // indirect
3435
github.com/jmespath/go-jmespath v0.4.0 // indirect
3536
golang.org/x/net v0.38.0 // indirect
36-
golang.org/x/sync v0.15.0 // indirect
3737
golang.org/x/text v0.23.0 // indirect
3838
gopkg.in/yaml.v2 v2.2.8 // indirect
3939
)

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
7676
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
7777
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
7878
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
79-
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
80-
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
8179
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
8280
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
8381
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

internal/events/events.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package events
33
import (
44
"encoding/json"
55
"fmt"
6+
"sync"
67

78
"github.com/localstack/lambda-runtime-init/internal/localstack"
89

@@ -14,7 +15,9 @@ import (
1415
// TODO: Logs should all be collected here
1516
type LocalStackEventsAPI struct {
1617
interop.EventsAPI
17-
adapter *localstack.LocalStackClient
18+
adapter *localstack.LocalStackClient
19+
requestID string
20+
mu sync.RWMutex
1821
}
1922

2023
func NewLocalStackEventsAPI(adapter *localstack.LocalStackClient) *LocalStackEventsAPI {
@@ -28,8 +31,15 @@ func (ev *LocalStackEventsAPI) SendFault(data interop.FaultData) error {
2831
// We can ignore whatever errors are returned here
2932
_ = ev.EventsAPI.SendFault(data)
3033

34+
requestID := string(data.RequestID)
35+
if data.RequestID == "" {
36+
ev.mu.RLock()
37+
requestID = ev.requestID
38+
ev.mu.RUnlock()
39+
}
40+
3141
resp := localstack.ErrorResponse{
32-
ErrorMessage: fmt.Sprintf("RequestId: %s Error: %s", data.RequestID, data.ErrorMessage),
42+
ErrorMessage: fmt.Sprintf("RequestId: %s Error: %s", requestID, data.ErrorMessage),
3343
ErrorType: string(data.ErrorType),
3444
}
3545

@@ -40,3 +50,9 @@ func (ev *LocalStackEventsAPI) SendFault(data interop.FaultData) error {
4050

4151
return ev.adapter.SendStatus(localstack.Error, payload)
4252
}
53+
54+
func (ev *LocalStackEventsAPI) SetCurrentRequestID(id interop.RequestID) {
55+
ev.mu.Lock()
56+
defer ev.mu.Unlock()
57+
ev.requestID = string(id)
58+
}

0 commit comments

Comments
 (0)