-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
proto+lnrpc: update gRPC-REST gateway to v1.8.6 #3650
Conversation
lnrpc/README.md
Outdated
```bash | ||
$ git clone https://github.com/grpc-ecosystem/grpc-gateway $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway | ||
$ cd $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway | ||
$ git reset --hard f2862b476edcef83412c7af8687c9cd8e4097c0f | ||
$ git reset --hard v1.8.6 | ||
$ go mod init |
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.
Why is this required? This version seems to support go modules.
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.
It's not required. That was left over from a trial with an older version. Fixed.
307af2a
to
b6c7ff8
Compare
it would be nice if we can also mark all the string fields as deprecated now and remove them in 0.10 |
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, this actually reduces the size of our gateway code! LGTM 🔥
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.
Tested and LGTM 👍
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.
it would be nice if we can also mark all the string fields as deprecated now and remove them in 0.10
Do we want to do this? I think it would be nice to be able to remove the string fields at some point
Yep, can be done in separate PR though. |
I am getting a new error:
|
Nvm, needed to update dep |
Fixes #3168
When using the REST gateway, fields that have the type
bytes
inrpc.proto
cannot be used in query or path parameters (see #552 which lead to workarounds like #592).The root cause of this is that the version of
grpc-gateway
we use doesn't support mapping to[]byte
yet.Trying to use
bytes
parameters results in{"error":"unsupported field type uint8","code":3}
.This has been fixed in grpc-ecosystem/grpc-gateway#489.
Unfortunately, we can't use the newest version of
grpc-gateway
(which would be1.11.3
at the moment) because that has a bug that messes up ourrpc.swagger.json
(grpc-ecosystem/grpc-gateway#746).After some trial and error, I found that version
1.8.6
is the newest version that works for our use case and produces the smallest diff in our generated code.