container-storage-interface / spec

Container Storage Interface (CSI) Specification.
Apache License 2.0
1.34k stars 373 forks source link

Floating grpc dependencies and build failures #434

Closed gnufied closed 4 years ago

gnufied commented 4 years ago

The build here is failing - https://travis-ci.org/github/container-storage-interface/spec/jobs/689878382 with following error:

get "google.golang.org/protobuf/runtime/protoimpl": found meta tag get.metaImport{Prefix:"google.golang.org/protobuf", VCS:"git", RepoRoot:"https://go.googlesource.com/protobuf"} at //google.golang.org/protobuf/runtime/protoimpl?go-get=1
get "google.golang.org/protobuf/runtime/protoimpl": verifying non-authoritative meta tag                                                      
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag                                                                             
golang.org/x/sys (download)                                                                                                                   
get "golang.org/x/net/http2": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at //golang.org/x/net/http2?go-get=1
get "golang.org/x/net/http2": verifying non-authoritative meta tag                                                                            
get "golang.org/x/net/http2/hpack": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at //golang.org/x/net/http2/hpack?go-get=1
get "golang.org/x/net/http2/hpack": verifying non-authoritative meta tag                                                                      
go install ./csi                                                                                                                              
# google.golang.org/genproto/googleapis/rpc/status                                                                                            
../../../../../google.golang.org/genproto/googleapis/rpc/status/status.pb.go:42:11: undefined: "github.com/golang/protobuf/proto".ProtoPackageIsVersion4
Makefile:123: recipe for target 'csi.a' failed                                                                                                
make[1]: *** [csi.a] Error 2                                                                                                                  
make[1]: Leaving directory '/home/hekumar/goal/src/github.com/container-storage-interface/spec/lib/go'                                        
Makefile:36: recipe for target 'build' failed                                                                                                 
make: *** [build] Error 2

And it is not that this PR - https://github.com/container-storage-interface/spec/pull/431 has a problem. It is because we are pinning version of protobuf library - https://github.com/golang/protobuf but we are not pinning version of https://github.com/grpc/grpc-go library. As a result - we are pulling master branch of https://github.com/googleapis/go-genproto/tree/master/googleapis/rpc/status which is not compatible with protobuf-1.3.2 and hence build error.

To fix this we have two options:

  1. We can bump protobuf library to v1.4.2. I don't know if it is safe to do.
  2. Or we can downgrade genproto (which seems to be a dependency of grpc-go) to SHA c45acf45369a9d2fa234d9508b092aefb9cb9385 which works. This would obviously involve pinning grpc-go version.
gnufied commented 4 years ago

cc @jdef @saad-ali

gnufied commented 4 years ago

I have attempted to fix this using go modules - https://github.com/container-storage-interface/spec/pull/435