Skip to content

Commit

Permalink
fix: use proper commonpb proto
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
rustatian committed Aug 26, 2023
1 parent 1a23b62 commit 34f8f88
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ require (
go.temporal.io/api v1.24.0
go.temporal.io/sdk v1.24.0
go.temporal.io/sdk/contrib/tally v0.2.0
go.temporal.io/server v1.21.4
go.temporal.io/server v1.21.5
go.uber.org/zap v1.25.0
google.golang.org/protobuf v1.31.0
)
@@ -40,7 +40,7 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/gogo/status v1.1.1 // indirect
github.com/golang/mock v1.7.0-rc.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.3
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/pborman/uuid v1.2.1 // indirect
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1177,8 +1177,8 @@ go.temporal.io/sdk v1.24.0 h1:mAk5VFR+z4s8QVzRx3iIpRnHcEO3m10CYNjnRXrhVq4=
go.temporal.io/sdk v1.24.0/go.mod h1:S7vWxU01lGcCny0sWx03bkkYw4VtVrpzeqBTn2A6y+E=
go.temporal.io/sdk/contrib/tally v0.2.0 h1:XnTJIQcjOv+WuCJ1u8Ve2nq+s2H4i/fys34MnWDRrOo=
go.temporal.io/sdk/contrib/tally v0.2.0/go.mod h1:1kpSuCms/tHeJQDPuuKkaBsMqfHnIIRnCtUYlPNXxuE=
go.temporal.io/server v1.21.4 h1:lW32GaqHEWWveeEYKWFzqpfQTws5OXSVUvB3hEofCYc=
go.temporal.io/server v1.21.4/go.mod h1:o3azXry/6fuvSuXSpPmeCmkUmZ0RuFYgULJu67qwRZY=
go.temporal.io/server v1.21.5 h1:ks5E4Wg5dx0otoqm6bUMuqJPEMOTGhWWWAbB14FNwi4=
go.temporal.io/server v1.21.5/go.mod h1:Anhwf81oxKyealAxmQ+WspX4YDHOUuHmhgJDhi35wKM=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
5 changes: 3 additions & 2 deletions rpc.go
Original file line number Diff line number Diff line change
@@ -6,10 +6,11 @@ import (
"time"

"github.com/gogo/protobuf/jsonpb"
v1Proto "github.com/golang/protobuf/proto" //nolint:staticcheck
"github.com/roadrunner-server/api/v4/build/common/v1"
commonpb "github.com/roadrunner-server/api/v4/build/temporal/api/common/v1"
protoApi "github.com/roadrunner-server/api/v4/build/temporal/v1"
"github.com/temporalio/roadrunner-temporal/v4/internal/logger"
commonpb "go.temporal.io/api/common/v1"
"go.temporal.io/api/enums/v1"
"go.temporal.io/api/history/v1"
"go.temporal.io/sdk/activity"
@@ -55,7 +56,7 @@ func (r *rpc) RecordActivityHeartbeat(in RecordHeartbeatRequest, out *RecordHear
details := &commonpb.Payloads{}

if len(in.Details) != 0 {
if err := proto.Unmarshal(in.Details, details); err != nil {
if err := proto.Unmarshal(in.Details, v1Proto.MessageV2(details)); err != nil {
return err
}
}

0 comments on commit 34f8f88

Please sign in to comment.