-
Notifications
You must be signed in to change notification settings - Fork 87
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
Show the use of proper gogo/googleapi types with status. #10
Conversation
f50526a
to
a916715
Compare
server/server.go
Outdated
} | ||
|
||
return nil, st.Err() | ||
byts, _ := proto.Marshal(b) |
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.
Remember to check the error.
server/server.go
Outdated
}, | ||
}, | ||
} | ||
byts, _ := proto.Marshal(b) |
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.
Remember to check the error
server/server.go
Outdated
"github.com/gogo/protobuf/types" | ||
"google.golang.org/genproto/googleapis/rpc/errdetails" | ||
pbAny "github.com/golang/protobuf/ptypes/any" |
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 we still planning to get rid of these pbAny and pbStatus types and replace them with gogo types in future?
|
||
"github.com/cockroachdb/cockroach/pkg/util/protoutil" | ||
gogoproto "github.com/gogo/protobuf/proto" | ||
golangproto "github.com/golang/protobuf/proto" |
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.
nice :)
a916715
to
72656a6
Compare
status/README.md
Outdated
The changes applies include changing the use of the | ||
`golang/protobuf` packages to `gogo/protobuf`, and changing the | ||
generated files from `google.golang.org/genproto/googleapis` to | ||
`github.com/goog/googleapis/`. |
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.
gogo not goog :)
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.
Whoops
I'm going to remove the manual vendor changes and wait with merging this until upstream (grpc/grpc-go#1927) has been merged (or rejected 😭). |
72656a6
to
fdf1bbb
Compare
Sounds like a plan :)
…On Sun, 18 Mar 2018 at 16:06 Johan Brandhorst ***@***.***> wrote:
I'm going to remove the manual vendor changes and wait with merging this
until upstream (grpc/grpc-go#1927
<grpc/grpc-go#1927>) has been merged (or rejected
😭).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABvsLUSM8jRNZlsiWaP5YvjWAgC1vhO2ks5tfngLgaJpZM4Su5sh>
.
|
fdf1bbb
to
c6c9366
Compare
Gopkg.toml
Outdated
name = "google.golang.org/grpc" | ||
version = "1.10.0" | ||
# version = "1.10.0"# | ||
source = "github.com/johanbrandhorst/grpc-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.
TODO: Revert back once grpc/grpc-go#1927 is merged
c6c9366
to
2113316
Compare
Gopkg.toml
Outdated
branch = "patch-1" | ||
name = "google.golang.org/grpc" | ||
# version = "1.10.0"# | ||
source = "github.com/johanbrandhorst/grpc-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.
TODO: Revert this once grpc/grpc-go#1927 is merged
Gopkg.toml
Outdated
name = "github.com/golang/mock" | ||
name = "github.com/mwitkow/go-proto-validators" | ||
|
||
[[override]] |
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.
TODO: Set this back to [[constraint]]
2113316
to
799a991
Compare
Updated in anticipation of grpc/grpc-go#1927. Will just need setting the Gopkg.toml back then we can merge. |
Ooo wow. This looks great. I hope 1927 goes through. Great work. |
Adds an error detail to the ListUsers call in order to ensure both streaming and unary calls properly translate gogo statuses.
Upgrading to 1.11.0 revealed that we weren't using the ipv4 scheme at all as I expected. Now just pass through the raw localhost address instead.
799a991
to
751c4e8
Compare
I've update this with the new gRPC version, and gogo/status, and everything seems to work alright. |
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.
Beautiful :)
This avoids the use of
google.golang.org/genproto
package types (except for the mandatory status type).