Skip to content
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

rpc: flatten details field #218

Merged
merged 2 commits into from
Sep 7, 2016
Merged

rpc: flatten details field #218

merged 2 commits into from
Sep 7, 2016

Conversation

BrianHicks
Copy link
Contributor

We don't need a struct details field, just bytes. I also re-read the spec and realized that the google.proto.Any specifies that the content will be protobuf-serialized. We don't have that on the structs we're serializing, so that's changed just a bit.

@BrianHicks BrianHicks force-pushed the feature/flatten-details branch from 69b4a22 to bd655bf Compare September 6, 2016 15:13
@ryane
Copy link
Contributor

ryane commented Sep 7, 2016

lgtm. this also fixes graph over rpc for me.

one note: this is already accounted for in the readme but I had been running with protoc 2.6.1 and this pr seems to enforce the 3.x requirement. Just a note for anyone who runs into problems - it took me a while to get my environment sorted out. After trying a bunch of things, I ended up building protoc from source and reinstalling the other rpc dependencies mentioned in the readme.

@stevendborrelli
Copy link
Member

@ryane we should have a converge config that installs protoc. I have this as an rpc.hcl:

param "gopath" {
  default = "${HOME}/gopath"
}

task "gopath" {
  description = "Create GOPATH"
  check = "[[ -d {{param `gopath`}} ]]"
  apply = "mkdir -p {{param `gopath`}}"
}

task "install protoc-gen-go" {
  check = "[[ -f {{param `gopath`}}/bin/protoc-gen-go ]]"
  apply = "go get -u github.com/golang/protobuf/protoc-gen-go"
  depends = ["task.gopath"]
}

task "install protoc-gen-grpc-gateway" {
  check = "[[ -f {{param `gopath`}}/bin/protoc-gen-grpc-gateway ]]"
  apply = "go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway "
  depends = ["task.gopath"]
}

task "install protoc-gen-swagger" {
  check = "[[ -f {{param `gopath`}}/bin/protoc-gen-swagger ]]"
  apply = "go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"
  depends = ["task.gopath"]
}

@BrianHicks
Copy link
Contributor Author

Yeah, gRPC requires Protocol Buffers 3.x.

@BrianHicks BrianHicks merged commit 59e3842 into master Sep 7, 2016
@BrianHicks BrianHicks deleted the feature/flatten-details branch September 7, 2016 18:36
@ryane
Copy link
Contributor

ryane commented Sep 7, 2016

my main problem was the protoc binary. once that was updated, the other golang dependencies needed rebuilt. In my troubleshooting, I ended up building protoc from source but it may not have been necessary - the pre-built binary might have been sufficient.

BrianHicks added a commit that referenced this pull request Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants