Replace all cases of naive protobuf<->JSON marshaling
The "internal API" JSON messages we send from gitlab-rails to gitlab-workhorse sometimes contain embedded protobuf messages. Because we didn't know better, we sometimes marshal/unmarshal these protobuf messages using native language constructs in Ruby and Go. This doesn't work for all protobuf field types. You need to use https://godoc.org/github.com/golang/protobuf/jsonpb and the proto class .to_json method in Ruby, and arrange things so that the Go JSON library does not pre-emptively parses the JSON-protobuf stuff.
We do this right in some places, but we still do it wrong in others. We need to (carefully!) replace the "wrong" places with correct marshaling.
Edited by 🤖 GitLab Bot 🤖