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

gRPC: fix server reflection (backport #8945) #9253

Closed
wants to merge 3 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 3, 2021

This is an automatic backport of pull request #8945 done by Mergify.
Cherry-pick of ac48ffe has failed:

On branch mergify/bp/release/v0.42.x/pr-8945
Your branch is up to date with 'origin/release/v0.42.x'.

You are currently cherry-picking commit ac48ffe74.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   docs/run-node/interact-node.md
	new file:   server/grpc/gogoreflection/doc.go
	new file:   server/grpc/gogoreflection/fix_registration.go
	new file:   server/grpc/gogoreflection/fix_registration_test.go
	new file:   server/grpc/gogoreflection/serverreflection.go
	modified:   server/grpc/server.go
	modified:   server/grpc/server_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   go.mod
	both modified:   go.sum

To fix up this pull request, you can check it out locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

* add: gogoreflection

* fix: server reflection

* fix: make tests resolve imports in a transitive way

* chore: cleanup getMessageType

* chore: lint

* add: extensions reflection

* chore: update interact-node.md docs

* chore: update CHANGELOG.md

* Update server/grpc/gogoreflection/fix_registration.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
(cherry picked from commit ac48ffe)

# Conflicts:
#	CHANGELOG.md
#	go.mod
#	go.sum
@mergify mergify bot requested review from aaronc, alessio and alexanderbez as code owners May 3, 2021 14:35
@mergify mergify bot added the conflicts label May 3, 2021
@mergify mergify bot mentioned this pull request May 3, 2021
9 tasks
@amaury1093 amaury1093 added this to the v0.42.5 milestone May 3, 2021
@amaury1093
Copy link
Contributor

Hmm, there's a weird error:

            	            	Symbol not found: ibc.core.connection.v1.Query
            	            	caused by: File not found: confio/proofs.proto

i can take a look (unless if @fdymylja you have an immediate idea what's happening?)

@fdymylja
Copy link
Contributor

fdymylja commented May 5, 2021

@AmauryM https://github.com/confio/ics23/blob/master/go/proofs.pb.go#L1158

proofs registers itself as proof.proto

but is imported most likely by IBC as confio/proofs.proto

which causes reflectiont to fail because the file in the registry is registered with a different path compared to how descriptors import it as.

@@ -4,7 +4,7 @@ package ibc.core.commitment.v1;
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types";

import "gogoproto/gogo.proto";
import "confio/proofs.proto";
import "proofs.proto";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unfortunate (ref: #9253 (comment)). In 07cf792 I moved proofs.proto to the third_party/proto root folder.

Does this workaround work for you @fdymylja?

Is the correct way of solving this to create a PR on https://github.com/confio/ics23/ to move the proofs.proto file there into a confio subfolder?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative is just to not backport this fix...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with @robert-zaremba, let's just not backport this PR, and ask people to use 0.43 if they want server reflection.

@amaury1093 amaury1093 closed this May 12, 2021
@mergify mergify bot deleted the mergify/bp/release/v0.42.x/pr-8945 branch May 12, 2021 12:10
@robert-zaremba
Copy link
Collaborator

We skip this PR. The fix here is only gRPC related. It doesn't break any logical flow nor existing tools nor is related to security. This feature did not work in the past.

gRPC is reflection is correctly implemented in v0.43. We just released beta (v0.43-beta), and RC is nearby.

@amaury1093 amaury1093 removed this from the v0.42.5 milestone May 18, 2021
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.

5 participants