all: switch usage of gax-go to gax-go/v2 This is in preparation for module support: we should pin to v2 of gax-go, since feature development will happen there. Current users of gax-go v1 should not be affected since all existing v1 features are type aliased to v2. In general, though, users should use v2. This is blocked by https://github.com/googleapis/gapic-generator/issues/2483. When that issue is finished, a new CL will go out with the new generator output. This CL will be rebased, which will cause all the autogen changes to be removed out of this CL (since they'll have been done in the aformenetioned generate CL). Relevant issue: https://github.com/googleapis/google-cloud-go/issues/1068 Change-Id: I6c3c56c24178f1572fb94f3f8c0951049ca6ebb7 Reviewed-on: https://code-review.googlesource.com/c/36432 Reviewed-by: Eno Compton <enocom@google.com>
diff --git a/asset/v1beta1/asset_client.go b/asset/v1beta1/asset_client.go index 4ff3bdb..a1fdc01 100644 --- a/asset/v1beta1/asset_client.go +++ b/asset/v1beta1/asset_client.go
@@ -22,7 +22,7 @@ "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" "google.golang.org/api/transport" assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1beta1"
diff --git a/bigquery/bigquery.go b/bigquery/bigquery.go index 83e160e..02ee0c7 100644 --- a/bigquery/bigquery.go +++ b/bigquery/bigquery.go
@@ -23,7 +23,7 @@ "cloud.google.com/go/internal" "cloud.google.com/go/internal/version" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" bq "google.golang.org/api/bigquery/v2" "google.golang.org/api/googleapi" "google.golang.org/api/option"
diff --git a/bigquery/integration_test.go b/bigquery/integration_test.go index 0957413..724eae8 100644 --- a/bigquery/integration_test.go +++ b/bigquery/integration_test.go
@@ -38,7 +38,7 @@ "cloud.google.com/go/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option"
diff --git a/bigquery/job.go b/bigquery/job.go index d98211d..3dfae7f 100644 --- a/bigquery/job.go +++ b/bigquery/job.go
@@ -22,7 +22,7 @@ "cloud.google.com/go/internal" "cloud.google.com/go/internal/trace" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" bq "google.golang.org/api/bigquery/v2" "google.golang.org/api/googleapi" "google.golang.org/api/iterator"
diff --git a/bigtable/internal/gax/call_option.go b/bigtable/internal/gax/call_option.go index 79c580b..3c22139 100644 --- a/bigtable/internal/gax/call_option.go +++ b/bigtable/internal/gax/call_option.go
@@ -14,7 +14,7 @@ limitations under the License. */ -// Package gax is a snapshot from github.com/googleapis/gax-go with minor modifications. +// Package gax is a snapshot from github.com/googleapis/gax-go/v2 with minor modifications. package gax import (
diff --git a/bigtable/internal/gax/invoke.go b/bigtable/internal/gax/invoke.go index 228dd44..2208970 100644 --- a/bigtable/internal/gax/invoke.go +++ b/bigtable/internal/gax/invoke.go
@@ -14,7 +14,7 @@ limitations under the License. */ -// Package gax is a snapshot from github.com/googleapis/gax-go with minor modifications. +// Package gax is a snapshot from github.com/googleapis/gax-go/v2 with minor modifications. package gax import (
diff --git a/container/apiv1/cluster_manager_client.go b/container/apiv1/cluster_manager_client.go index bb3011c..22978d3 100644 --- a/container/apiv1/cluster_manager_client.go +++ b/container/apiv1/cluster_manager_client.go
@@ -21,7 +21,7 @@ "time" "cloud.google.com/go/internal/version" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" "google.golang.org/api/transport" containerpb "google.golang.org/genproto/googleapis/container/v1"
diff --git a/datastore/client.go b/datastore/client.go index 8eee203..618d8bb 100644 --- a/datastore/client.go +++ b/datastore/client.go
@@ -20,7 +20,7 @@ "cloud.google.com/go/internal" "cloud.google.com/go/internal/version" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/datastore/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes"
diff --git a/errorreporting/errors.go b/errorreporting/errors.go index 1a47057..9ceb27a 100644 --- a/errorreporting/errors.go +++ b/errorreporting/errors.go
@@ -31,7 +31,7 @@ vkit "cloud.google.com/go/errorreporting/apiv1beta1" "cloud.google.com/go/internal/version" "github.com/golang/protobuf/ptypes" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" "google.golang.org/api/support/bundler" pb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
diff --git a/errorreporting/errors_test.go b/errorreporting/errors_test.go index 29a7adb..dbca1c1 100644 --- a/errorreporting/errors_test.go +++ b/errorreporting/errors_test.go
@@ -22,7 +22,7 @@ "time" "cloud.google.com/go/internal/testutil" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" pb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1" )
diff --git a/firestore/client.go b/firestore/client.go index a5f014f..80dc0c3 100644 --- a/firestore/client.go +++ b/firestore/client.go
@@ -25,7 +25,7 @@ vkit "cloud.google.com/go/firestore/apiv1beta1" "cloud.google.com/go/internal/version" "github.com/golang/protobuf/ptypes" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" "google.golang.org/api/option" pb "google.golang.org/genproto/googleapis/firestore/v1beta1"
diff --git a/firestore/transaction.go b/firestore/transaction.go index 20a8a2a..fc91217 100644 --- a/firestore/transaction.go +++ b/firestore/transaction.go
@@ -18,7 +18,7 @@ "context" "errors" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/firestore/v1beta1" "google.golang.org/grpc" "google.golang.org/grpc/codes"
diff --git a/firestore/watch.go b/firestore/watch.go index ec31d98..69af05b 100644 --- a/firestore/watch.go +++ b/firestore/watch.go
@@ -25,7 +25,7 @@ "cloud.google.com/go/internal/btree" "github.com/golang/protobuf/ptypes" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/firestore/v1beta1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status"
diff --git a/firestore/watch_test.go b/firestore/watch_test.go index c7f163f..04dda0c1 100644 --- a/firestore/watch_test.go +++ b/firestore/watch_test.go
@@ -22,7 +22,7 @@ "cloud.google.com/go/internal/btree" "github.com/golang/protobuf/proto" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/firestore/v1beta1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status"
diff --git a/iam/iam.go b/iam/iam.go index 76df635..4d8af93 100644 --- a/iam/iam.go +++ b/iam/iam.go
@@ -25,7 +25,7 @@ "context" "time" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/iam/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes"
diff --git a/internal/retry.go b/internal/retry.go index 99093cc..7a7b4c2 100644 --- a/internal/retry.go +++ b/internal/retry.go
@@ -18,7 +18,7 @@ "context" "time" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" ) // Retry calls the supplied function f repeatedly according to the provided
diff --git a/internal/retry_test.go b/internal/retry_test.go index 367f52c..a012056 100644 --- a/internal/retry_test.go +++ b/internal/retry_test.go
@@ -21,7 +21,7 @@ "testing" "time" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" )
diff --git a/logging/logadmin/logadmin.go b/logging/logadmin/logadmin.go index d50f5e0..55c0693 100644 --- a/logging/logadmin/logadmin.go +++ b/logging/logadmin/logadmin.go
@@ -39,7 +39,7 @@ vkit "cloud.google.com/go/logging/apiv2" "cloud.google.com/go/logging/internal" "github.com/golang/protobuf/ptypes" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" "google.golang.org/api/option" _ "google.golang.org/genproto/googleapis/appengine/logging/v1" // Import the following so EntryIterator can unmarshal log protos.
diff --git a/logging/logging_test.go b/logging/logging_test.go index bea566b..ce6bb04 100644 --- a/logging/logging_test.go +++ b/logging/logging_test.go
@@ -35,7 +35,7 @@ "cloud.google.com/go/logging" ltesting "cloud.google.com/go/logging/internal/testing" "cloud.google.com/go/logging/logadmin" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "golang.org/x/oauth2" "google.golang.org/api/iterator" "google.golang.org/api/option"
diff --git a/longrunning/longrunning.go b/longrunning/longrunning.go index 639482a..e1d9dcf 100644 --- a/longrunning/longrunning.go +++ b/longrunning/longrunning.go
@@ -30,7 +30,7 @@ autogen "cloud.google.com/go/longrunning/autogen" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc/codes" "google.golang.org/grpc/status"
diff --git a/longrunning/longrunning_test.go b/longrunning/longrunning_test.go index 7c07dd5..38fea35 100644 --- a/longrunning/longrunning_test.go +++ b/longrunning/longrunning_test.go
@@ -26,7 +26,7 @@ "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/duration" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/longrunning" status "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc"
diff --git a/profiler/profiler.go b/profiler/profiler.go index 01cd1ab..86a7089 100644 --- a/profiler/profiler.go +++ b/profiler/profiler.go
@@ -54,7 +54,7 @@ "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/google/pprof/profile" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" gtransport "google.golang.org/api/transport/grpc" pb "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2"
diff --git a/profiler/profiler_test.go b/profiler/profiler_test.go index 6b10008..261b5ef 100644 --- a/profiler/profiler_test.go +++ b/profiler/profiler_test.go
@@ -38,7 +38,7 @@ "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/google/pprof/profile" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" gtransport "google.golang.org/api/transport/grpc" pb "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2" edpb "google.golang.org/genproto/googleapis/rpc/errdetails"
diff --git a/profiler/proftest/proftest.go b/profiler/proftest/proftest.go index f1a9ee6..ff9438c 100644 --- a/profiler/proftest/proftest.go +++ b/profiler/proftest/proftest.go
@@ -31,7 +31,7 @@ "time" "cloud.google.com/go/storage" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "golang.org/x/build/kubernetes" k8sapi "golang.org/x/build/kubernetes/api" "golang.org/x/build/kubernetes/gke"
diff --git a/pubsub/integration_test.go b/pubsub/integration_test.go index 5880c63..ae6b1a7 100644 --- a/pubsub/integration_test.go +++ b/pubsub/integration_test.go
@@ -24,7 +24,7 @@ "cloud.google.com/go/internal" "cloud.google.com/go/internal/testutil" "cloud.google.com/go/internal/uid" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/grpc"
diff --git a/pubsub/iterator.go b/pubsub/iterator.go index 0d2a715..da43a96 100644 --- a/pubsub/iterator.go +++ b/pubsub/iterator.go
@@ -22,7 +22,7 @@ vkit "cloud.google.com/go/pubsub/apiv1" "cloud.google.com/go/pubsub/internal/distribution" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/pubsub/v1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status"
diff --git a/pubsub/pullstream.go b/pubsub/pullstream.go index 2fdb538..1c332ef 100644 --- a/pubsub/pullstream.go +++ b/pubsub/pullstream.go
@@ -20,7 +20,7 @@ "sync" "time" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/pubsub/v1" "google.golang.org/grpc" )
diff --git a/pubsub/pullstream_test.go b/pubsub/pullstream_test.go index 108344d..8105ce3 100644 --- a/pubsub/pullstream_test.go +++ b/pubsub/pullstream_test.go
@@ -21,7 +21,7 @@ "cloud.google.com/go/internal/testutil" "cloud.google.com/go/pubsub/pstest" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" pb "google.golang.org/genproto/googleapis/pubsub/v1" "google.golang.org/grpc"
diff --git a/pubsub/service.go b/pubsub/service.go index 0752f3a..b7358fe 100644 --- a/pubsub/service.go +++ b/pubsub/service.go
@@ -20,7 +20,7 @@ "strings" "time" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/pubsub/v1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status"
diff --git a/pubsub/subscription.go b/pubsub/subscription.go index 09f9dbc..4620c56 100644 --- a/pubsub/subscription.go +++ b/pubsub/subscription.go
@@ -27,7 +27,7 @@ "cloud.google.com/go/internal/optional" "github.com/golang/protobuf/ptypes" durpb "github.com/golang/protobuf/ptypes/duration" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "golang.org/x/sync/errgroup" pb "google.golang.org/genproto/googleapis/pubsub/v1" fmpb "google.golang.org/genproto/protobuf/field_mask"
diff --git a/pubsub/topic.go b/pubsub/topic.go index a9dc97e..17f3d61 100644 --- a/pubsub/topic.go +++ b/pubsub/topic.go
@@ -25,7 +25,7 @@ "cloud.google.com/go/iam" "github.com/golang/protobuf/proto" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/support/bundler" pb "google.golang.org/genproto/googleapis/pubsub/v1" fmpb "google.golang.org/genproto/protobuf/field_mask"
diff --git a/spanner/retry.go b/spanner/retry.go index 5003523..203f146 100644 --- a/spanner/retry.go +++ b/spanner/retry.go
@@ -157,7 +157,7 @@ // runRetryable keeps attempting to run f until one of the following happens: // 1) f returns nil error or an unretryable error; // 2) context is cancelled or timeout. -// TODO: consider using https://github.com/googleapis/gax-go once it +// TODO: consider using https://github.com/googleapis/gax-go/v2 once it // becomes available internally. func runRetryable(ctx context.Context, f func(context.Context) error) error { return toSpannerError(runRetryableNoWrap(ctx, f))
diff --git a/storage/invoke.go b/storage/invoke.go index 0a03f11..e755f19 100644 --- a/storage/invoke.go +++ b/storage/invoke.go
@@ -18,7 +18,7 @@ "context" "cloud.google.com/go/internal" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" ) // runWithRetry calls the function until it returns nil or a non-retryable error, or
diff --git a/vision/apiv1/client.go b/vision/apiv1/client.go index 77ae33e..ab14a92 100644 --- a/vision/apiv1/client.go +++ b/vision/apiv1/client.go
@@ -17,7 +17,7 @@ import ( "context" - gax "github.com/googleapis/gax-go" + gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/cloud/vision/v1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status"