Skip to content

Commit 5779353

Browse files
authored
migrate protos (#439)
* remove clean command for protos Signed-off-by: mikeee <[email protected]> * delete internal protos Signed-off-by: mikeee <[email protected]> * migrate refs to 1.11.1-rc.2 Signed-off-by: mikeee <[email protected]> * migrate metadata pb import Signed-off-by: mikeee <[email protected]> * bump imports (dapr 1.12.0-rc.4) Signed-off-by: mikeee <[email protected]> * fix wait test to allow more than one "client" Signed-off-by: mikeee <[email protected]> --------- Signed-off-by: mikeee <[email protected]>
1 parent e16e035 commit 5779353

34 files changed

+67
-13855
lines changed

Makefile

-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
RELEASE_VERSION =v1.0.0-rc-3
22
GDOC_PORT =8888
3-
PROTO_ROOT =https://raw.githubusercontent.com/dapr/dapr/master/dapr/proto/
43
GO_COMPAT_VERSION=1.19
54

65
.PHONY: all
@@ -38,12 +37,6 @@ tag: ## Creates release tag
3837
git tag $(RELEASE_VERSION)
3938
git push origin $(RELEASE_VERSION)
4039

41-
.PHONY: clean
42-
clean: ## Cleans go and generated files in ./dapr/proto/
43-
go clean
44-
rm -fr ./dapr/proto/common/v1/*.pb.go
45-
rm -fr ./dapr/proto/runtime/v1/*.pb.go
46-
4740
.PHONY: help
4841
help: ## Display available commands
4942
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk \

client/actor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import (
2222

2323
anypb "github.com/golang/protobuf/ptypes/any"
2424

25+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2526
"github.com/dapr/go-sdk/actor"
2627
"github.com/dapr/go-sdk/actor/codec"
2728
"github.com/dapr/go-sdk/actor/config"
28-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
2929
)
3030

3131
const (

client/binding.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"errors"
1919
"fmt"
2020

21-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
21+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2222
)
2323

2424
// InvokeBindingRequest represents binding invocation request.

client/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
"google.golang.org/grpc/metadata"
3636
"google.golang.org/protobuf/types/known/emptypb"
3737

38-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
38+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
3939

4040
// used to import codec implements.
4141
_ "github.com/dapr/go-sdk/actor/codec/impl"

client/client_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import (
3434
"google.golang.org/grpc/test/bufconn"
3535
"google.golang.org/protobuf/types/known/anypb"
3636

37-
commonv1pb "github.com/dapr/go-sdk/dapr/proto/common/v1"
38-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
37+
commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1"
38+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
3939
)
4040

4141
const (

client/configuration.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"io"
88

9-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
9+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
1010
)
1111

1212
type ConfigurationItem struct {

client/crypto.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
"google.golang.org/grpc"
2323
"google.golang.org/protobuf/proto"
2424

25-
commonv1pb "github.com/dapr/go-sdk/dapr/proto/common/v1"
26-
runtimev1pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
25+
commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1"
26+
runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2727
)
2828

2929
// Encrypt data read from a stream, returning a readable stream that receives the encrypted data.

client/crypto_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import (
2525
"github.com/stretchr/testify/require"
2626
"google.golang.org/grpc"
2727

28-
commonv1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
29-
runtimev1pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
28+
commonv1 "github.com/dapr/dapr/pkg/proto/common/v1"
29+
runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
3030
)
3131

3232
func TestEncrypt(t *testing.T) {

client/invoke.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
anypb "github.com/golang/protobuf/ptypes/any"
2424

25-
v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
26-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
25+
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
26+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2727
)
2828

2929
// DataContent the service invocation content.

client/invoke_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
"github.com/stretchr/testify/assert"
2121

22-
v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
22+
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
2323
)
2424

2525
type _testStructwithText struct {

client/lock.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"errors"
1919
"fmt"
2020

21-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
21+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2222
)
2323

2424
// LockRequest is the lock request object.

client/lock_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
"github.com/stretchr/testify/assert"
2121

22-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
22+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2323
)
2424

2525
const (

client/metadata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"google.golang.org/protobuf/types/known/emptypb"
99

10-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
10+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
1111
)
1212

1313
type GetMetadataResponse struct {

client/pubsub.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/google/uuid"
2424

25-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
25+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2626
)
2727

2828
const (

client/secret.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"errors"
1919
"fmt"
2020

21-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
21+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2222
)
2323

2424
// GetSecret retrieves preconfigured secret from specified store using key.

client/state.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121

2222
"github.com/golang/protobuf/ptypes/duration"
2323

24-
v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
25-
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
24+
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
25+
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
2626
)
2727

2828
const (

client/state_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
"github.com/stretchr/testify/assert"
2222

23-
v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
23+
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
2424
)
2525

2626
const (

client/wait_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func TestGrpcWaitUnresponsiveTcpServer(t *testing.T) {
135135
err = client.Wait(ctx, waitTimeout)
136136
assert.Error(t, err)
137137
assert.Equal(t, errWaitTimedOut, err)
138-
assert.Equal(t, uint64(1), atomic.LoadUint64(&server.nClientsSeen))
138+
assert.GreaterOrEqual(t, atomic.LoadUint64(&server.nClientsSeen), uint64(1))
139139
}
140140

141141
func TestGrpcWaitUnresponsiveUnixServer(t *testing.T) {
@@ -153,5 +153,5 @@ func TestGrpcWaitUnresponsiveUnixServer(t *testing.T) {
153153
err = client.Wait(ctx, waitTimeout)
154154
assert.Error(t, err)
155155
assert.Equal(t, errWaitTimedOut, err)
156-
assert.Equal(t, uint64(1), atomic.LoadUint64(&server.nClientsSeen))
156+
assert.GreaterOrEqual(t, atomic.LoadUint64(&server.nClientsSeen), uint64(1))
157157
}

0 commit comments

Comments
 (0)