-
Notifications
You must be signed in to change notification settings - Fork 576
Use golang protobuf in operator json generated code #1283
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
Conversation
🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test? Courtesy of your friendly test nag. |
/test build_api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the operator protos in golang proto? because they reference mesh config, which is in gogo, which may cause issues
@@ -217,6 +217,7 @@ $(operator_v1alpha1_pb_gos) $(operator_v1alpha1_pb_doc) $(operator_v1alpha1_pb_p | |||
@cp -r /tmp/istio.io/api/operator/* operator | |||
@sed -i -E '/MarshalJSON is a custom marshaler for TypeMapStringInterface2/,+10d' $(operator_v1alpha1_path)/operator_json.gen.go | |||
@sed -i -E '/MarshalJSON is a custom marshaler for TypeInterface2/,+10d' $(operator_v1alpha1_path)/operator_json.gen.go | |||
@sed -i 's/gogo/golang/g' $(operator_v1alpha1_path)/operator_json.gen.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels like the wrong way to do this but I'm not a proto expert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/istio/tools/tree/master/cmd/protoc-gen-jsonshim produces gogo:
https://github.com/istio/tools/blob/master/cmd/protoc-gen-jsonshim/jsonshim/plugin.go#L63
So theres no other way :(
The operator protos are in golang, and changing this seems not super easy due to GOTYPE |
It would be preferable to move operator to gogo, but I think that will require some surgery. I don't really understand the GOTYPE stuff we are doing and why its needed |
The json generation stuff is gogo, but the operator proto is golang. This is causing issues.
Fixes istio/istio#20986