Skip to content

Commit ce31365

Browse files
authored
fix(bigtable): move usage to local proto definitions (#10598)
Changes generated with: `cloud.google.com/go/internal/aliasfix/cmd/aliasfix`
1 parent 485d54b commit ce31365

31 files changed

+73
-41
lines changed

bigtable/admin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"strings"
2727
"time"
2828

29+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2930
btopt "cloud.google.com/go/bigtable/internal/option"
3031
"cloud.google.com/go/iam"
3132
"cloud.google.com/go/internal/optional"
@@ -36,7 +37,6 @@ import (
3637
"google.golang.org/api/iterator"
3738
"google.golang.org/api/option"
3839
gtransport "google.golang.org/api/transport/grpc"
39-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
4040
"google.golang.org/genproto/googleapis/rpc/status"
4141
"google.golang.org/grpc/metadata"
4242
"google.golang.org/protobuf/types/known/durationpb"

bigtable/admin_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import (
2222
"testing"
2323
"time"
2424

25+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2526
"cloud.google.com/go/internal/pretty"
2627
"cloud.google.com/go/internal/testutil"
2728
longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
2829
"github.com/google/go-cmp/cmp"
29-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
3030
"google.golang.org/grpc"
3131
"google.golang.org/protobuf/types/known/anypb"
3232
"google.golang.org/protobuf/types/known/timestamppb"

bigtable/aliasshim.go

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bigtable/bigtable.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ import (
2727
"strings"
2828
"time"
2929

30+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
3031
btopt "cloud.google.com/go/bigtable/internal/option"
3132
"cloud.google.com/go/internal/trace"
3233
gax "github.com/googleapis/gax-go/v2"
3334
"go.opentelemetry.io/otel/metric"
3435
"google.golang.org/api/option"
3536
"google.golang.org/api/option/internaloption"
3637
gtransport "google.golang.org/api/transport/grpc"
37-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
3838
"google.golang.org/grpc"
3939
"google.golang.org/grpc/codes"
4040
"google.golang.org/grpc/metadata"

bigtable/bigtable_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
"testing"
2525
"time"
2626

27+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2728
"github.com/google/go-cmp/cmp"
2829
"google.golang.org/api/option"
29-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
3030
"google.golang.org/grpc"
3131
)
3232

bigtable/bttest/inmem.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ import (
5252
"google.golang.org/grpc/metadata"
5353
"google.golang.org/protobuf/proto"
5454

55+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
56+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
5557
longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
5658
"github.com/google/btree"
57-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
58-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
5959
statpb "google.golang.org/genproto/googleapis/rpc/status"
6060
"google.golang.org/grpc"
6161
"google.golang.org/grpc/codes"

bigtable/bttest/inmem_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ import (
3030

3131
"google.golang.org/grpc/metadata"
3232

33+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
34+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
3335
"cloud.google.com/go/bigtable/internal/option"
3436
"cloud.google.com/go/internal/testutil"
3537
"github.com/google/go-cmp/cmp"
36-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
37-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
3838
"google.golang.org/grpc"
3939
"google.golang.org/grpc/codes"
4040
"google.golang.org/grpc/status"

bigtable/bttest/instance_server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818
"context"
1919
"regexp"
2020

21+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2122
"cloud.google.com/go/iam/apiv1/iampb"
2223
longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
23-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
2424
"google.golang.org/grpc/codes"
2525
"google.golang.org/grpc/status"
2626
"google.golang.org/protobuf/types/known/emptypb"

bigtable/bttest/instance_server_test.go

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

21-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
21+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2222
"google.golang.org/grpc/codes"
2323
"google.golang.org/grpc/status"
2424
)

bigtable/bttest/validation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package bttest
1919
import (
2020
"bytes"
2121

22-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
22+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2323
"google.golang.org/grpc/codes"
2424
"google.golang.org/grpc/status"
2525
)

bigtable/bttest/validation_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package bttest
1919
import (
2020
"testing"
2121

22-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
22+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2323
"google.golang.org/grpc/codes"
2424
"google.golang.org/grpc/status"
2525
)

bigtable/conformance_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ import (
2525
"testing"
2626
"time"
2727

28+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2829
pb "cloud.google.com/go/bigtable/internal/conformance"
2930
"cloud.google.com/go/bigtable/internal/mockserver"
3031
"google.golang.org/api/option"
31-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
3232
"google.golang.org/grpc"
3333
"google.golang.org/protobuf/encoding/protojson"
3434
)

bigtable/filter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"strings"
2222
"time"
2323

24-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
24+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2525
)
2626

2727
// A Filter represents a row filter.

bigtable/gc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"strings"
2222
"time"
2323

24-
bttdpb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
24+
bttdpb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2525
"google.golang.org/protobuf/types/known/durationpb"
2626
)
2727

bigtable/gc_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"testing"
2020
"time"
2121

22-
bttdpb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
22+
bttdpb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2323
)
2424

2525
func TestGcRuleToString(t *testing.T) {

bigtable/go.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ go 1.20
44

55
require (
66
cloud.google.com/go v0.115.0
7-
cloud.google.com/go/iam v1.1.10
8-
cloud.google.com/go/longrunning v0.5.9
7+
cloud.google.com/go/iam v1.1.11
8+
cloud.google.com/go/longrunning v0.5.10
99
github.com/google/btree v1.1.2
1010
github.com/google/go-cmp v0.6.0
1111
github.com/googleapis/cloud-bigtable-clients-test v0.0.2
@@ -15,15 +15,15 @@ require (
1515
go.opentelemetry.io/otel/sdk v1.24.0 // Use older version compatible with Go 1.20
1616
go.opentelemetry.io/otel/sdk/metric v1.24.0 // Use older version compatible with Go 1.20
1717
google.golang.org/api v0.189.0
18-
google.golang.org/genproto v0.0.0-20240722135656-d784300faade
18+
google.golang.org/genproto v0.0.0-20240725213756-90e476079158
1919
google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade
2020
google.golang.org/grpc v1.64.1
2121
google.golang.org/protobuf v1.34.2
2222
rsc.io/binaryregexp v0.2.0
2323
)
2424

2525
require (
26-
cloud.google.com/go/monitoring v1.20.1
26+
cloud.google.com/go/monitoring v1.20.2
2727
github.com/google/uuid v1.6.0
2828
google.golang.org/genproto/googleapis/api v0.0.0-20240722135656-d784300faade
2929
)

bigtable/go.sum

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAg
99
cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I=
1010
cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY=
1111
cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=
12-
cloud.google.com/go/iam v1.1.10 h1:ZSAr64oEhQSClwBL670MsJAW5/RLiC6kfw3Bqmd5ZDI=
13-
cloud.google.com/go/iam v1.1.10/go.mod h1:iEgMq62sg8zx446GCaijmA2Miwg5o3UbO+nI47WHJps=
14-
cloud.google.com/go/longrunning v0.5.9 h1:haH9pAuXdPAMqHvzX0zlWQigXT7B0+CL4/2nXXdBo5k=
15-
cloud.google.com/go/longrunning v0.5.9/go.mod h1:HD+0l9/OOW0za6UWdKJtXoFAX/BGg/3Wj8p10NeWF7c=
16-
cloud.google.com/go/monitoring v1.20.1 h1:XmM6uk4+mI2ZhWdI2n/2GNhJdpeQN+1VdG2UWEDhX48=
17-
cloud.google.com/go/monitoring v1.20.1/go.mod h1:FYSe/brgfuaXiEzOQFhTjsEsJv+WePyK71X7Y8qo6uQ=
12+
cloud.google.com/go/iam v1.1.11 h1:0mQ8UKSfdHLut6pH9FM3bI55KWR46ketn0PuXleDyxw=
13+
cloud.google.com/go/iam v1.1.11/go.mod h1:biXoiLWYIKntto2joP+62sd9uW5EpkZmKIvfNcTWlnQ=
14+
cloud.google.com/go/longrunning v0.5.10 h1:eB/BniENNRKhjz/xgiillrdcH3G74TGSl3BXinGlI7E=
15+
cloud.google.com/go/longrunning v0.5.10/go.mod h1:tljz5guTr5oc/qhlUjBlk7UAIFMOGuPNxkNDZXlLics=
16+
cloud.google.com/go/monitoring v1.20.2 h1:B/L+xrw9PYO7ywh37sgnjI/6dzEE+yQTAwfytDcpPto=
17+
cloud.google.com/go/monitoring v1.20.2/go.mod h1:36rpg/7fdQ7NX5pG5x1FA7cXTVXusOp6Zg9r9e1+oek=
1818
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
1919
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
2020
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
@@ -155,8 +155,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
155155
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
156156
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
157157
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
158-
google.golang.org/genproto v0.0.0-20240722135656-d784300faade h1:lKFsS7wpngDgSCeFn7MoLy+wBDQZ1UQIJD4UNM1Qvkg=
159-
google.golang.org/genproto v0.0.0-20240722135656-d784300faade/go.mod h1:FfBgJBJg9GcpPvKIuHSZ/aE1g2ecGL74upMzGZjiGEY=
158+
google.golang.org/genproto v0.0.0-20240725213756-90e476079158 h1:xGRZVaxMSQ65qWv+kQRrh8+RqGHAJELFga9qlJzrt7o=
159+
google.golang.org/genproto v0.0.0-20240725213756-90e476079158/go.mod h1:od+6rA98elHRdDlQTg6Lok9YQJ8hYumTbgVBUbM/YXw=
160160
google.golang.org/genproto/googleapis/api v0.0.0-20240722135656-d784300faade h1:WxZOF2yayUHpHSbUE6NMzumUzBxYc3YGwo0YHnbzsJY=
161161
google.golang.org/genproto/googleapis/api v0.0.0-20240722135656-d784300faade/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0=
162162
google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade h1:oCRSWfwGXQsqlVdErcyTt4A93Y8fo0/9D4b1gnI++qo=

bigtable/integration_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"testing"
3434
"time"
3535

36+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
3637
"cloud.google.com/go/iam"
3738
"cloud.google.com/go/internal"
3839
"cloud.google.com/go/internal/optional"
@@ -43,7 +44,6 @@ import (
4344
"github.com/google/go-cmp/cmp"
4445
gax "github.com/googleapis/gax-go/v2"
4546
"google.golang.org/api/iterator"
46-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
4747
grpc "google.golang.org/grpc"
4848
"google.golang.org/grpc/codes"
4949
"google.golang.org/grpc/status"

bigtable/internal/conformance/tests.pb.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bigtable/internal/mockserver/inmem.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121
"net"
2222

23-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
23+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2424
"google.golang.org/grpc"
2525
"google.golang.org/grpc/codes"
2626
"google.golang.org/grpc/status"

bigtable/internal/option/option.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"fmt"
2424
"os"
2525

26-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
26+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2727
"google.golang.org/protobuf/proto"
2828

2929
"cloud.google.com/go/bigtable/internal"

bigtable/internal/testproxy/proxy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import (
2626
"time"
2727

2828
"cloud.google.com/go/bigtable"
29+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2930
pb "github.com/googleapis/cloud-bigtable-clients-test/testproxypb"
3031
"google.golang.org/api/option"
31-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
3232
statpb "google.golang.org/genproto/googleapis/rpc/status"
3333
"google.golang.org/grpc"
3434
"google.golang.org/grpc/codes"

bigtable/internal/testproxy/proxy_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import (
2424
"testing"
2525

2626
"cloud.google.com/go/bigtable"
27+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2728
"cloud.google.com/go/bigtable/bttest"
2829
pb "github.com/googleapis/cloud-bigtable-clients-test/testproxypb"
2930
"google.golang.org/api/option"
30-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
3131
"google.golang.org/grpc"
3232
"google.golang.org/grpc/codes"
3333
"google.golang.org/grpc/credentials/insecure"

bigtable/metric_util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"strconv"
2222
"strings"
2323

24-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
24+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2525
"google.golang.org/grpc/metadata"
2626
"google.golang.org/protobuf/proto"
2727
)

bigtable/metrics_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import (
2424
"testing"
2525
"time"
2626

27+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2728
"cloud.google.com/go/internal/testutil"
2829
"github.com/google/go-cmp/cmp/cmpopts"
2930
"go.opentelemetry.io/otel/attribute"
3031
"google.golang.org/api/option"
31-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
3232
"google.golang.org/grpc"
3333
"google.golang.org/grpc/codes"
3434
"google.golang.org/grpc/credentials/insecure"

bigtable/reader.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222
"strings"
2323

24-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
24+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2525
)
2626

2727
// A Row is returned by ReadRows. The map is keyed by column family (the prefix

bigtable/reader_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"strings"
2424
"testing"
2525

26+
btspb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2627
"cloud.google.com/go/internal/testutil"
27-
btspb "google.golang.org/genproto/googleapis/bigtable/v2"
2828
"google.golang.org/protobuf/encoding/prototext"
2929
"google.golang.org/protobuf/types/known/wrapperspb"
3030
)

bigtable/retry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import (
2121
"testing"
2222
"time"
2323

24+
btpb "cloud.google.com/go/bigtable/apiv2/bigtablepb"
2425
"cloud.google.com/go/bigtable/bttest"
2526
"cloud.google.com/go/internal/testutil"
2627
"github.com/google/go-cmp/cmp"
2728
"google.golang.org/api/option"
28-
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
2929
rpcpb "google.golang.org/genproto/googleapis/rpc/status"
3030
"google.golang.org/grpc"
3131
"google.golang.org/grpc/codes"

bigtable/type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
package bigtable
1818

19-
import btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
19+
import btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2020

2121
// Type wraps the protobuf representation of a type. See the protobuf definition
2222
// for more details on types.

bigtable/type_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package bigtable
1919
import (
2020
"testing"
2121

22-
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
22+
btapb "cloud.google.com/go/bigtable/admin/apiv2/adminpb"
2323
"google.golang.org/protobuf/proto"
2424
)
2525

internal/aliasfix/mappings.go

+8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ var GenprotoPkgMigration map[string]Pkg = map[string]Pkg{
6666
ImportPath: "cloud.google.com/go/area120/tables/apiv1alpha1/tablespb",
6767
Status: StatusMigrated,
6868
},
69+
"google.golang.org/genproto/googleapis/bigtable/admin/v2": {
70+
ImportPath: "cloud.google.com/go/bigtable/admin/apiv2/adminpb",
71+
Status: StatusMigrated,
72+
},
73+
"google.golang.org/genproto/googleapis/bigtable/v2": {
74+
ImportPath: "cloud.google.com/go/bigtable/apiv2/bigtablepb",
75+
Status: StatusMigrated,
76+
},
6977
"google.golang.org/genproto/googleapis/cloud/accessapproval/v1": {
7078
ImportPath: "cloud.google.com/go/accessapproval/apiv1/accessapprovalpb",
7179
Status: StatusMigrated,

0 commit comments

Comments
 (0)