Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use milvus-proto/go-api/v2 for master #489

Merged
merged 1 commit into from
Jun 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ generate-proto: check-protoc-version

generate-mockery: install-tool
@echo "generating mockery milvus service server"
@$(INSTALL_PATH)/mockery --srcpkg=github.com/milvus-io/milvus-proto/go-api/milvuspb --name=MilvusServiceServer --output=mocks --outpkg=mocks --with-expecter
@$(INSTALL_PATH)/mockery --srcpkg=github.com/milvus-io/milvus-proto/go-api/v2/milvuspb --name=MilvusServiceServer --output=mocks --outpkg=mocks --with-expecter

static-check:
@echo "Running $@ check:"
Expand Down
2 changes: 1 addition & 1 deletion client/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package client
import (
"context"

server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
)

// GetVersion returns milvus server version information.
Expand Down
2 changes: 1 addition & 1 deletion client/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package client
import (
"context"

server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
)

// CreateAlias creates an alias for collection
Expand Down
4 changes: 2 additions & 2 deletions client/alias_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion client/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"context"

server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/internal/utils/crypto"
)

Expand Down
4 changes: 2 additions & 2 deletions client/authentication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/stretchr/testify/assert"
)

Expand Down
25 changes: 18 additions & 7 deletions client/client_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
"github.com/milvus-io/milvus-proto/go-api/federpb"
"github.com/milvus-io/milvus-proto/go-api/milvuspb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/federpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/milvus-io/milvus-sdk-go/v2/mocks"
"github.com/stretchr/testify/mock"
Expand Down Expand Up @@ -139,7 +138,7 @@ func (s *MockSuiteBase) setupHasPartitionError(errorCode common.ErrorCode, err e
func (s *MockSuiteBase) setupDescribeCollection(collName string, schema *entity.Schema) {
s.mock.EXPECT().DescribeCollection(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeCollectionRequest")).
Call.Return(func(ctx context.Context, req *server.DescribeCollectionRequest) *server.DescribeCollectionResponse {
return &milvuspb.DescribeCollectionResponse{
return &server.DescribeCollectionResponse{
Status: &common.Status{ErrorCode: common.ErrorCode_Success},
Schema: schema.ProtoMessage(),
}
Expand All @@ -148,7 +147,7 @@ func (s *MockSuiteBase) setupDescribeCollection(collName string, schema *entity.

func (s *MockSuiteBase) setupDescribeCollectionError(errorCode common.ErrorCode, err error) {
s.mock.EXPECT().DescribeCollection(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeCollectionRequest")).
Return(&milvuspb.DescribeCollectionResponse{
Return(&server.DescribeCollectionResponse{
Status: &common.Status{ErrorCode: errorCode},
}, err)
}
Expand Down Expand Up @@ -873,6 +872,18 @@ func (m *MockServer) GetIndexStatistics(_ context.Context, _ *server.GetIndexSta
panic("not implemented") // TODO: Implement
}

func (m *MockServer) CreateDatabase(_a0 context.Context, _a1 *server.CreateDatabaseRequest) (*common.Status, error) {
panic("not implemented") // TODO: Implement
}

func (m *MockServer) DropDatabase(_a0 context.Context, _a1 *server.DropDatabaseRequest) (*common.Status, error) {
panic("not implemented") // TODO: Implement
}

func (m *MockServer) ListDatabases(_a0 context.Context, _a1 *server.ListDatabasesRequest) (*server.ListDatabasesResponse, error) {
panic("not implemented") // TODO: Implement
}

func (m *MockServer) Connect(_ context.Context, _ *server.ConnectRequest) (*server.ConnectResponse, error) {
return &server.ConnectResponse{
Status: &common.Status{ErrorCode: common.ErrorCode_Success},
Expand Down
4 changes: 2 additions & 2 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"google.golang.org/grpc/status"
"google.golang.org/grpc/test/bufconn"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
4 changes: 2 additions & 2 deletions client/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/golang/protobuf/proto"
"github.com/milvus-io/milvus-sdk-go/v2/entity"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
)

// handles response status
Expand Down
6 changes: 3 additions & 3 deletions client/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
4 changes: 2 additions & 2 deletions client/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
Expand Down
6 changes: 3 additions & 3 deletions client/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (

"github.com/cockroachdb/errors"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
6 changes: 3 additions & 3 deletions client/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
4 changes: 2 additions & 2 deletions client/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"fmt"
"time"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
4 changes: 2 additions & 2 deletions client/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions client/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (

"github.com/cockroachdb/errors"
"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"

"github.com/milvus-io/milvus-sdk-go/v2/entity"
)
Expand Down
6 changes: 3 additions & 3 deletions client/insert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"testing"

"github.com/cockroachdb/errors"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion client/maintainance.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"time"

server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/milvus-io/milvus-sdk-go/v2/internal/utils/tso"
)
Expand Down
4 changes: 2 additions & 2 deletions client/maintainance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/milvus-io/milvus-sdk-go/v2/internal/utils/tso"
"github.com/stretchr/testify/assert"
Expand Down
4 changes: 2 additions & 2 deletions client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

"github.com/cockroachdb/errors"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
4 changes: 2 additions & 2 deletions client/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"math/rand"
"testing"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions client/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

"github.com/cockroachdb/errors"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
4 changes: 2 additions & 2 deletions client/partition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions client/rate_limit_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"google.golang.org/grpc/status"

grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
)

// ref: https://github.com/grpc-ecosystem/go-grpc-middleware
Expand Down
2 changes: 1 addition & 1 deletion client/rate_limit_interceptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/stretchr/testify/assert"
"google.golang.org/grpc"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
)

var mockInvokerError error
Expand Down
4 changes: 2 additions & 2 deletions client/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package client
import (
"context"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
4 changes: 2 additions & 2 deletions client/rbac_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/stretchr/testify/mock"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
)

type RBACSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion client/resource_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package client
import (
"context"

server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
4 changes: 2 additions & 2 deletions client/resource_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"

common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
)

type ResourceGroupSuite struct {
Expand Down
4 changes: 2 additions & 2 deletions client/row.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
)

Expand Down
6 changes: 3 additions & 3 deletions client/row_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/cockroachdb/errors"

"github.com/golang/protobuf/proto"
common "github.com/milvus-io/milvus-proto/go-api/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus-sdk-go/v2/entity"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion entity/columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"fmt"
"math"

schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"

"github.com/cockroachdb/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion entity/columns_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/cockroachdb/errors"
schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
)

var _ (Column) = (*ColumnJSONBytes)(nil)
Expand Down
Loading