Skip to content

Commit

Permalink
migrate protos (#439)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
mikeee authored Sep 26, 2023
1 parent e16e035 commit 5779353
Show file tree
Hide file tree
Showing 34 changed files with 67 additions and 13,855 deletions.
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
RELEASE_VERSION =v1.0.0-rc-3
GDOC_PORT =8888
PROTO_ROOT =https://raw.githubusercontent.com/dapr/dapr/master/dapr/proto/
GO_COMPAT_VERSION=1.19

.PHONY: all
Expand Down Expand Up @@ -38,12 +37,6 @@ tag: ## Creates release tag
git tag $(RELEASE_VERSION)
git push origin $(RELEASE_VERSION)

.PHONY: clean
clean: ## Cleans go and generated files in ./dapr/proto/
go clean
rm -fr ./dapr/proto/common/v1/*.pb.go
rm -fr ./dapr/proto/runtime/v1/*.pb.go

.PHONY: help
help: ## Display available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk \
Expand Down
2 changes: 1 addition & 1 deletion client/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

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

pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
"github.com/dapr/go-sdk/actor"
"github.com/dapr/go-sdk/actor/codec"
"github.com/dapr/go-sdk/actor/config"
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"errors"
"fmt"

pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

// InvokeBindingRequest represents binding invocation request.
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/types/known/emptypb"

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

// used to import codec implements.
_ "github.com/dapr/go-sdk/actor/codec/impl"
Expand Down
4 changes: 2 additions & 2 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
"google.golang.org/grpc/test/bufconn"
"google.golang.org/protobuf/types/known/anypb"

commonv1pb "github.com/dapr/go-sdk/dapr/proto/common/v1"
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"io"

pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

type ConfigurationItem struct {
Expand Down
4 changes: 2 additions & 2 deletions client/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"

commonv1pb "github.com/dapr/go-sdk/dapr/proto/common/v1"
runtimev1pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1"
runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

// Encrypt data read from a stream, returning a readable stream that receives the encrypted data.
Expand Down
4 changes: 2 additions & 2 deletions client/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/stretchr/testify/require"
"google.golang.org/grpc"

commonv1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
runtimev1pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
commonv1 "github.com/dapr/dapr/pkg/proto/common/v1"
runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

func TestEncrypt(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions client/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

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

v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

// DataContent the service invocation content.
Expand Down
2 changes: 1 addition & 1 deletion client/invoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/stretchr/testify/assert"

v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
)

type _testStructwithText struct {
Expand Down
2 changes: 1 addition & 1 deletion client/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"errors"
"fmt"

pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

// LockRequest is the lock request object.
Expand Down
2 changes: 1 addition & 1 deletion client/lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/stretchr/testify/assert"

pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

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

pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

type GetMetadataResponse struct {
Expand Down
2 changes: 1 addition & 1 deletion client/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/google/uuid"

pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"errors"
"fmt"

pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

// GetSecret retrieves preconfigured secret from specified store using key.
Expand Down
4 changes: 2 additions & 2 deletions client/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

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

v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/stretchr/testify/assert"

v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions client/wait_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func TestGrpcWaitUnresponsiveTcpServer(t *testing.T) {
err = client.Wait(ctx, waitTimeout)
assert.Error(t, err)
assert.Equal(t, errWaitTimedOut, err)
assert.Equal(t, uint64(1), atomic.LoadUint64(&server.nClientsSeen))
assert.GreaterOrEqual(t, atomic.LoadUint64(&server.nClientsSeen), uint64(1))
}

func TestGrpcWaitUnresponsiveUnixServer(t *testing.T) {
Expand All @@ -153,5 +153,5 @@ func TestGrpcWaitUnresponsiveUnixServer(t *testing.T) {
err = client.Wait(ctx, waitTimeout)
assert.Error(t, err)
assert.Equal(t, errWaitTimedOut, err)
assert.Equal(t, uint64(1), atomic.LoadUint64(&server.nClientsSeen))
assert.GreaterOrEqual(t, atomic.LoadUint64(&server.nClientsSeen), uint64(1))
}
Loading

0 comments on commit 5779353

Please sign in to comment.