Skip to content

Commit eaf55d7

Browse files
authored
Merge pull request dapr#5932 from yaron2/asbinputfix-1
Fix input binding response and update to contrib-rc.9
2 parents 2accc6c + 7ef2189 commit eaf55d7

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/PuerkitoBio/purell v1.2.0
1010
github.com/benbjohnson/clock v1.3.0
1111
github.com/cenkalti/backoff/v4 v4.2.0
12-
github.com/dapr/components-contrib v1.10.0-rc.6
12+
github.com/dapr/components-contrib v1.10.0-rc.9
1313
github.com/dapr/kit v0.0.4
1414
github.com/fasthttp/router v1.4.15
1515
github.com/ghodss/yaml v1.0.0
@@ -151,7 +151,7 @@ require (
151151
github.com/bits-and-blooms/bitset v1.2.0 // indirect
152152
github.com/boltdb/bolt v1.3.1 // indirect
153153
github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822 // indirect
154-
github.com/camunda/zeebe/clients/go/v8 v8.0.11 // indirect
154+
github.com/camunda/zeebe/clients/go/v8 v8.1.8 // indirect
155155
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
156156
github.com/cespare/xxhash/v2 v2.1.2 // indirect
157157
github.com/clbanning/mxj/v2 v2.5.6 // indirect

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,8 @@ github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822/go.mod h1:H0wQ
645645
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
646646
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
647647
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA=
648-
github.com/camunda/zeebe/clients/go/v8 v8.0.11 h1:rDqsr0h5H9wmPg1bk0srNRakhtvVO5KcMVgbftKTQqg=
649-
github.com/camunda/zeebe/clients/go/v8 v8.0.11/go.mod h1:vqeNO1EphExqC15spP56PNXQ6SB8sMjhEfO16bfFRPo=
648+
github.com/camunda/zeebe/clients/go/v8 v8.1.8 h1:/i3t1PaToPfED+609uNR9kdGo/LPFTE4jK5/SEbwY4Y=
649+
github.com/camunda/zeebe/clients/go/v8 v8.1.8/go.mod h1:nQc5qX4lPSxWUW0VuJ+k3b+FdcVLNa29A/nAQG2q9u4=
650650
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
651651
github.com/cenkalti/backoff v2.0.0+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
652652
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
@@ -716,8 +716,8 @@ github.com/dancannon/gorethink v4.0.0+incompatible h1:KFV7Gha3AuqT+gr0B/eKvGhbjm
716716
github.com/dancannon/gorethink v4.0.0+incompatible/go.mod h1:BLvkat9KmZc1efyYwhz3WnybhRZtgF1K929FD8z1avU=
717717
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
718718
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
719-
github.com/dapr/components-contrib v1.10.0-rc.6 h1:TUvTb8LsFZjTMNpjVgBbF48byJz05IXJ7R6kM/kdBeo=
720-
github.com/dapr/components-contrib v1.10.0-rc.6/go.mod h1:sr+nhohYQCtKM5bALE6zXF3RhqnMQmQ3u8R1WlW5FU0=
719+
github.com/dapr/components-contrib v1.10.0-rc.9 h1:iHVmtJ1Tc4Y1XaxA+LMLpKEfAanwSudXRAD+/+kgG8Q=
720+
github.com/dapr/components-contrib v1.10.0-rc.9/go.mod h1:JM3xDSSDVb+ot246VZndZZK1K8Ft/6Ch2FtXW1Jbbhk=
721721
github.com/dapr/kit v0.0.4 h1:i+7TIN4crC1Mo0JFyWpIkwAE8orlliA0O6/ibvs2AaE=
722722
github.com/dapr/kit v0.0.4/go.mod h1:RFN6r5pZzhrelB0SUr8Dha44ckRBl7t+B01X5aw8WeE=
723723
github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=

pkg/runtime/runtime.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -1365,14 +1365,16 @@ func (a *DaprRuntime) sendBindingEventToApp(bindingName string, data []byte, met
13651365
diag.UpdateSpanStatusFromHTTPStatus(span, int(resp.Status().Code))
13661366
span.End()
13671367
}
1368+
1369+
appResponseBody, err = resp.RawDataFull()
1370+
13681371
// ::TODO report metrics for http, such as grpc
13691372
if resp.Status().Code < 200 || resp.Status().Code > 299 {
1370-
body, _ := resp.RawDataFull()
1371-
return nil, fmt.Errorf("fails to send binding event to http app channel, status code: %d body: %s", resp.Status().Code, string(body))
1373+
return nil, fmt.Errorf("fails to send binding event to http app channel, status code: %d body: %s", resp.Status().Code, string(appResponseBody))
13721374
}
13731375

1374-
if resp.Message().Data != nil && len(resp.Message().Data.Value) > 0 {
1375-
appResponseBody = resp.Message().Data.Value
1376+
if err != nil {
1377+
return nil, fmt.Errorf("failed to read response body: %w", err)
13761378
}
13771379
}
13781380

0 commit comments

Comments
 (0)