-
Notifications
You must be signed in to change notification settings - Fork 413
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
Add protobuf deps #757
Add protobuf deps #757
Conversation
88f4f21
to
ee67dd7
Compare
Codecov Report
@@ Coverage Diff @@
## master #757 +/- ##
==========================================
+ Coverage 58.47% 58.51% +0.03%
==========================================
Files 49 49
Lines 5828 5828
==========================================
+ Hits 3408 3410 +2
+ Misses 2170 2169 -1
+ Partials 250 249 -1
|
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.
Excellent work. 💯
I expect that we need to pin the sdk protobuf versions to the sdk version that we use in go.mod. Can you :eye add the linked doc and add this to this PR, please?
Bonus points for some minimal doc in proto/readme how to do it.
@@ -10,7 +10,7 @@ SIMAPP = ./app | |||
|
|||
# for dockerized protobuf tools | |||
DOCKER := $(shell which docker) | |||
BUF_IMAGE=bufbuild/buf@sha256:9dc5d6645f8f8a2d5aaafc8957fbbb5ea64eada98a84cb09654e8f49d6f73b3e | |||
BUF_IMAGE=bufbuild/buf:1.0.0-rc12 |
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.
👍
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa | ||
google.golang.org/grpc v1.43.0 | ||
google.golang.org/genproto v0.0.0-20220211171837-173942840c17 | ||
google.golang.org/grpc v1.44.0 |
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.
Can you run go mod tidy
to clean up the files?
- buf.build/cosmos/cosmos-proto | ||
- buf.build/cosmos/cosmos-sdk | ||
- buf.build/cosmos/gogo-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.
So nice to see all the files removed. To achieve the same version "safety" for our dependencies, we need to pin them. I found this in the doc: https://docs.buf.build/tour/add-a-dependency#pin-your-dependencies for doc
I am not sure though if the files are available for the sdk v0.45.1 already.
This PR is pending as we need to find the "right" sdk protobufs versions to match our v0.45.x version |
Can you explain this more? Seems like an issue with the buf publishing system as used by the cosmos-sdk? Maybe @marbar3778 could help on this as he has been working to get more adoption of buf.build? |
Without "pinning" the protobufs to a fix version or tag, we would link to a moving target and could not have fully reproducible code-generations. The sdk publishes versions with the git hash as label (https://buf.build/cosmos/cosmos-sdk/history/main). This is great but seems to be for master only. We could not find the matching protobufs for the v0.45.1 hash @marbar3778 it would be great if you could help with pushing the protobufs for this version and automating this step to have them available for future tags as well. |
What is the state of this PR? If it is done and makes better protobuf generation, let's get it updated and merged. Or close if not needed |
We are still blocked for the same reason @alpe has explained above. |
Ah, now I understand that comment. |
@marbar3778 could you look into the buf.build publishing of the sdk (so they publish the actual releases, like v0.45.4) not just main branch? Or pass this off to someone working on that in the core team? |
we publish each time since proto version is not tied to software versioning. On buf you will see the sdk protofiles have v1beta1 and v1 tags. |
Hi @marbar3778 , it was nice to meet you at gateway conference ! We didn't have the chance to discuss about this PR. I have now created a PR in cosmos-sdk, and I think this will solve the issue we are having when trying to include cosmos-sdk protobufs from BSR. |
Closing in favor of #1030 |
Add dependencies to buf.yml
Remove third_party folder, since dependencies are fetched using the deps in buf.yml
Update Makefile
Update protocgen.sh script