-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: remove grpc replace directive #11089
Conversation
NOTE: also #10997 will not work as expected on certain cases without this fix due to conflicts between protobuf types and gogoproto types and interface unpacking... |
BREAKING changes:
|
All tests seem to pass... This removes the grpc replace from go.mod and unblocks the Tendermint module upgrade. Unsure about where to exactly place the |
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.
Generally fine with this approach since its temporary until we fully migrate to orm. which will m most likely be 1 or 2 major releases.
Does this allow us to bump grpc-gateway and swagger as well?
if they were blocked on gRPC then I'd assume yes |
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.
thanks a lot @fdymylja for digging into this, really appreciate it
@@ -27,7 +29,8 @@ func initClientContext(t *testing.T, envVar string) (client.Context, func()) { | |||
home := t.TempDir() | |||
clientCtx := client.Context{}. | |||
WithHomeDir(home). | |||
WithViper("") | |||
WithViper(""). | |||
WithCodec(codec.NewProtoCodec(codectypes.NewInterfaceRegistry())) |
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.
client.Context always expects a Codec (should we relax this?)
How would you relax it? Probably only WithInterfaceRegistry
is required?
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.
Yes given the interface registry we have our codec too.
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.
As far as relaxing goes, we could default to the gogoproto marshaler (if no codec is specified) but IDK how it would behave with Interface unpacking (let's assume WithInterfaceRegistry was not called).
If it worked before with the default gRPC codec then I would assume it also would work this way.
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.
with orm landing I don't think we can default to gogoproto. I think the force is fine for a single release and but then most teams will have migrated anyways
how does this effect js and other lang clients? |
totally unaffected, for instance if you were to use dynamic-cosmos with the pulsar generated types those changes do not touch you at all. they touch every codebase relying on and they also touch every codebase relying on |
can we add this to 0.46? |
depends on the timeline for 0.46, the change is quite breaking for [cosmos-sdk go] clients and i'd like to give them time to adapt and digest the change. |
What's your feeling on this @marbar3778? I think this can go in for 0.46. For users using |
its fine by me and fixes many issues users are running into |
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.
LGTM, pending some docs/changelogs
Thank you. Will wrap up by EOD with relaxation over client.Context, docs updates and changelog. |
Almost ready, going to test grpc json endpoints to check if the marshaller/unmarshaller works correctly. |
@AmauryM, @marbar3778 applied the relaxation over client context, updated docs and tested grpc web, the json transcoding endpoints (api exposed at 1317), all seems to work. Wanted to get a final ACK, then it's good to merge. |
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change