kubernetes: Missing proto struct tags incompatible with latest golang/protobuf changes

/kind bug

What happened: Imported proto files and tried to use with latest golang/protobuf lib. https://github.com/golang/protobuf/blob/master/proto/table_unmarshal.go#L331 mandates that all struct fields have proto tags. The TypeMeta fields in kubernetes structs do not contain a proto tag, https://github.com/kubernetes/apiserver/blob/master/pkg/apis/audit/v1beta1/types.go#L145 is a typical example.

What you expected to happen: Be able to import proto files and have them serialize/deserialize properly

How to reproduce it (as minimally and precisely as possible): Import a kubernetes proto file and use with latest golang/protobuf lib

Anything else we need to know?: I filed an issue with golang/protobuf https://github.com/golang/protobuf/issues/617 as it seems like a breaking change but they are pushing back

Environment:

  • Kubernetes version: 1.10.3
  • golang/protobuf version: master

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 24 (20 by maintainers)

Most upvoted comments

@wenjiaswe just a heads up we started a bit of work on this over in the proto issue https://github.com/golang/protobuf/issues/617#issuecomment-433492430 @amy was heading that up. Definitely open to collaborate though if you see a better way of handling this