Skip to content

Commit

Permalink
Rename vizierapipb folder and targets to vizierpb
Browse files Browse the repository at this point in the history
Summary: TSIA. This is more in line with our other protos.

Test Plan: Existing tests.

Reviewers: zasgar, michelle

Reviewed By: michelle

JIRA Issues: PP-2671

Differential Revision: https://phab.corp.pixielabs.ai/D8427

GitOrigin-RevId: 7d01df0d379eeceb214efd9438ac1f55c3e663ce
  • Loading branch information
vihangm authored and copybaranaut committed Apr 27, 2021
1 parent af0cad5 commit f4ab680
Show file tree
Hide file tree
Showing 16 changed files with 276 additions and 277 deletions.
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ go_library(
"//src/api/go/pxapi/types",
"//src/api/proto/cloudpb:cloudapi_pl_go_proto",
"//src/api/proto/uuidpb:uuid_pl_go_proto",
"//src/api/proto/vizierapipb:public_vizier_pl_go_proto",
"//src/api/proto/vizierpb:vizier_pl_go_proto",
"@com_github_gofrs_uuid//:uuid",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//credentials",
Expand Down Expand Up @@ -62,7 +62,7 @@ go_test(
deps = [
"//src/api/go/pxapi/errdefs",
"//src/api/go/pxapi/types",
"//src/api/proto/vizierapipb:public_vizier_pl_go_proto",
"//src/api/proto/vizierpb:vizier_pl_go_proto",
"@com_github_stretchr_testify//assert",
"@org_golang_google_grpc//codes",
],
Expand Down
8 changes: 4 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

"px.dev/pxapi/types"
"px.dev/pxapi/proto/cloudpb"
vizierapipb "px.dev/pxapi/proto/vizierapipb"
"px.dev/pxapi/proto/vizierpb"
)

const (
Expand Down Expand Up @@ -63,7 +63,7 @@ type Client struct {

grpcConn *grpc.ClientConn
cmClient cloudpb.VizierClusterInfoClient
vizier vizierapipb.VizierServiceClient
vizier vizierpb.VizierServiceClient
}

// NewClient creates a new Pixie API Client.
Expand Down Expand Up @@ -96,7 +96,7 @@ func (c *Client) init(ctx context.Context) error {
c.grpcConn = conn
c.cmClient = cloudpb.NewVizierClusterInfoClient(conn)

c.vizier = vizierapipb.NewVizierServiceClient(conn)
c.vizier = vizierpb.NewVizierServiceClient(conn)
return nil
}

Expand Down Expand Up @@ -150,7 +150,7 @@ func (c *Client) NewVizierClient(ctx context.Context, vizierID string) (*VizierC
vzClient := &VizierClient{
cloud: c,
vizierID: vizierID,
vzClient: vizierapipb.NewVizierServiceClient(vzConn),
vzClient: vizierpb.NewVizierServiceClient(vzConn),
}

return vzClient, nil
Expand Down
2 changes: 1 addition & 1 deletion errdefs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ go_library(
importpath = "px.dev/pxapi/errdefs",
visibility = ["//src:__subpackages__"],
deps = [
"//src/api/proto/vizierapipb:public_vizier_pl_go_proto",
"//src/api/proto/vizierpb:vizier_pl_go_proto",
"@org_golang_google_grpc//codes",
],
)
Expand Down
4 changes: 2 additions & 2 deletions errdefs/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package errdefs
import (
"fmt"

publicvizierapipb "px.dev/pxapi/proto/vizierapipb"
"px.dev/pxapi/proto/vizierpb"
)

// CompilerMultiError is an implementation of a multi-error for compiler messages.
Expand Down Expand Up @@ -92,7 +92,7 @@ func (e compilerErrorWithDetails) Message() string {
return e.message
}

func newCompilerErrorWithDetails(e *publicvizierapipb.CompilerError) compilerErrorWithDetails {
func newCompilerErrorWithDetails(e *vizierpb.CompilerError) compilerErrorWithDetails {
return compilerErrorWithDetails{
line: int64(e.Line),
column: int64(e.Column),
Expand Down
6 changes: 3 additions & 3 deletions errdefs/parsers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (

"google.golang.org/grpc/codes"

publicvizierapipb "px.dev/pxapi/proto/vizierapipb"
"px.dev/pxapi/proto/vizierpb"
)

// ParseStatus parses the status field. Returns an error if exists.
func ParseStatus(s *publicvizierapipb.Status) error {
func ParseStatus(s *vizierpb.Status) error {
if s == nil || s.Code == int32(codes.OK) {
return nil
}
Expand All @@ -37,7 +37,7 @@ func ParseStatus(s *publicvizierapipb.Status) error {
hasCompilerErrors := false
for _, d := range details {
switch e := d.Error.(type) {
case *publicvizierapipb.ErrorDetails_CompilerError:
case *vizierpb.ErrorDetails_CompilerError:
errs = append(errs, newCompilerErrorWithDetails(e.CompilerError))
hasCompilerErrors = true
default:
Expand Down
4 changes: 2 additions & 2 deletions proto/vizierapipb/BUILD.bazel → proto/vizierpb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ pl_cc_proto_library(
)

pl_go_proto_library(
name = "public_vizier_pl_go_proto",
importpath = "px.dev/pxapi/proto/vizierapipb",
name = "vizier_pl_go_proto",
importpath = "px.dev/pxapi/proto/vizierpb",
proto = ":vizier_pl_proto",
visibility = ["//src:__subpackages__"],
)
Expand Down
2 changes: 1 addition & 1 deletion proto/vizierapipb/mock.go → proto/vizierpb/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

package publicvizierapipb
package vizierpb

//go:generate mockgen -source=vizierapi.pb.go -destination=mock/vizier_mock.gen.go VizierService_ExecuteScriptServer
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "mock",
srcs = ["vizier_mock.gen.go"],
importpath = "px.dev/pxapi/proto/vizierapipb/mock",
importpath = "px.dev/pxapi/proto/vizierpb/mock",
visibility = ["//src:__subpackages__"],
deps = [
"//src/api/proto/vizierapipb:public_vizier_pl_go_proto",
"//src/api/proto/vizierpb:vizier_pl_go_proto",
"@com_github_golang_mock//gomock",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//metadata",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f4ab680

Please sign in to comment.