Skip to content

migrate from github.com/golang/protobuf to google.golang.org/protobuf #1027

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

Merged
merged 1 commit into from
Jul 26, 2022
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
32 changes: 18 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ module sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
go 1.17

require (
cloud.google.com/go v0.81.0
github.com/GoogleCloudPlatform/k8s-cloud-provider v1.16.1-0.20210702024009-ea6160c1d0e3
github.com/container-storage-interface/spec v1.5.0
github.com/golang/protobuf v1.5.2
cloud.google.com/go/compute v1.7.0
cloud.google.com/go/kms v1.4.0
github.com/GoogleCloudPlatform/k8s-cloud-provider v1.18.0
github.com/container-storage-interface/spec v1.6.0
github.com/google/uuid v1.3.0
github.com/kubernetes-csi/csi-proxy/client v1.1.1
github.com/kubernetes-csi/csi-test/v4 v4.2.0
github.com/kubernetes-csi/csi-test/v4 v4.4.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.20.0
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
google.golang.org/api v0.46.0
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368
google.golang.org/grpc v1.40.0
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
google.golang.org/api v0.86.0
google.golang.org/genproto v0.0.0-20220720214146-176da50484ac
google.golang.org/grpc v1.48.0
google.golang.org/protobuf v1.28.0
gopkg.in/gcfg.v1 v1.2.3
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/apimachinery v0.24.1
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/component-base v0.24.1
Expand All @@ -30,6 +30,8 @@ require (
)

require (
cloud.google.com/go v0.103.0 // indirect
cloud.google.com/go/iam v0.3.0 // indirect
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
Expand All @@ -45,10 +47,12 @@ require (
github.com/go-openapi/swag v0.21.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
Expand All @@ -69,14 +73,14 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
go.opencensus.io v0.23.0 // indirect
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.24.1 // indirect
Expand Down
196 changes: 175 additions & 21 deletions go.sum

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions pkg/gce-pd-csi-driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ import (

"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
csi "github.com/container-storage-interface/spec/lib/go/csi"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
compute "google.golang.org/api/compute/v1"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/client-go/util/flowcontrol"
Expand Down Expand Up @@ -962,14 +961,14 @@ func (gceCS *GCEControllerServer) validateExistingImage(image *compute.Image, vo
return nil
}

func parseTimestamp(creationTimestamp string) (*timestamp.Timestamp, error) {
func parseTimestamp(creationTimestamp string) (*timestamppb.Timestamp, error) {
t, err := time.Parse(time.RFC3339, creationTimestamp)
if err != nil {
return nil, err
}

timestamp, err := ptypes.TimestampProto(t)
if err != nil {
timestamp := timestamppb.New(t)
if err := timestamp.CheckValid(); err != nil {
return nil, err
}
return timestamp, nil
Expand Down Expand Up @@ -1241,8 +1240,8 @@ func (gceCS *GCEControllerServer) getSnapshotByID(ctx context.Context, snapshotI
func generateDiskSnapshotEntry(snapshot *compute.Snapshot) (*csi.ListSnapshotsResponse_Entry, error) {
t, _ := time.Parse(time.RFC3339, snapshot.CreationTimestamp)

tp, err := ptypes.TimestampProto(t)
if err != nil {
tp := timestamppb.New(t)
if err := tp.CheckValid(); err != nil {
return nil, fmt.Errorf("Failed to covert creation timestamp: %v", err)
}

Expand All @@ -1266,9 +1265,9 @@ func generateDiskSnapshotEntry(snapshot *compute.Snapshot) (*csi.ListSnapshotsRe
func generateDiskImageEntry(image *compute.Image) (*csi.ListSnapshotsResponse_Entry, error) {
t, _ := time.Parse(time.RFC3339, image.CreationTimestamp)

tp, err := ptypes.TimestampProto(t)
if err != nil {
return nil, fmt.Errorf("Failed to covert creation timestamp: %v", err)
tp := timestamppb.New(t)
if err := tp.CheckValid(); err != nil {
return nil, fmt.Errorf("failed to covert creation timestamp: %v", err)
}

ready, _ := isImageReady(image.Status)
Expand Down
11 changes: 5 additions & 6 deletions pkg/gce-pd-csi-driver/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"time"

"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
"github.com/golang/protobuf/ptypes"
"google.golang.org/protobuf/types/known/timestamppb"

compute "google.golang.org/api/compute/v1"
"google.golang.org/grpc/codes"
Expand All @@ -36,7 +36,6 @@ import (
csi "github.com/container-storage-interface/spec/lib/go/csi"
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/common"
gce "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/compute"
gcecloudprovider "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/compute"
)

const (
Expand Down Expand Up @@ -71,8 +70,8 @@ var (

func TestCreateSnapshotArguments(t *testing.T) {
thetime, _ := time.Parse(time.RFC3339, gce.Timestamp)
tp, err := ptypes.TimestampProto(thetime)
if err != nil {
tp := timestamppb.New(thetime)
if err := tp.CheckValid(); err != nil {
t.Fatalf("Unable to conver time to timestamp: %v", err)
}
// Define test cases
Expand Down Expand Up @@ -2207,7 +2206,7 @@ func backoffTesterForUnpublish(t *testing.T, config *backoffTesterConfig) {
}()
go func() {
executeChan := <-readyToExecute
executeChan <- gcecloudprovider.Signal{ReportError: reportError}
executeChan <- gce.Signal{ReportError: reportError}
}()
return <-response
}
Expand Down Expand Up @@ -2371,7 +2370,7 @@ func backoffTesterForPublish(t *testing.T, config *backoffTesterConfig) {
}()
go func() {
executeChan := <-readyToExecute
executeChan <- gcecloudprovider.Signal{ReportError: reportError}
executeChan <- gce.Signal{ReportError: reportError}
}()
return <-response
}
Expand Down
12 changes: 12 additions & 0 deletions vendor/cloud.google.com/go/.gitignore

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

107 changes: 107 additions & 0 deletions vendor/cloud.google.com/go/.release-please-manifest-submodules.json

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

3 changes: 3 additions & 0 deletions vendor/cloud.google.com/go/.release-please-manifest.json

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

Loading