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

All Makefile proto commands use Docker #7931

Merged
merged 8 commits into from
Nov 13, 2020
Merged

All Makefile proto commands use Docker #7931

merged 8 commits into from
Nov 13, 2020

Conversation

amaury1093
Copy link
Contributor

@amaury1093 amaury1093 commented Nov 13, 2020

Description

follow-up: #7332
follow-up: #7901 (comment)
closes: #7851
ref: #7893 (comment)

Problem

Too many user errors when generating from proto files (wrong buf, protoc, protoc-gen-gocosmos...). It has been decided in #7332 to use Docker

However, some Makefile commands still use the local binaries.

Proposed Solution

  • Makefile commands only use docker for protobuf tooling
  • Remove proto-tools-installer.sh since we use Docker
  • Update CONTRIBUTING guide

To test the commands: I ran all the proto-* commands, and the output is committed in this PR. It'd be nice if someone would run the commands again, to make sure there's no file diff.

Additional Notes

If you absolutely don't want to run Docker, then you should 1/ make sure your tooling is correctly installed locally, with the same versions as those in the Dockerfile and 2/ run the scripts directly, e.g. $ ./scripts/protocgen.sh.

This should be a niche case for advanced users, so I prefer to remove this use case from the Makefile.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@amaury1093 amaury1093 changed the title All Makefile commands use Docker All Makefile proto commands use Docker Nov 13, 2020
@amaury1093 amaury1093 marked this pull request as ready for review November 13, 2020 12:05
@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #7931 (a73d88c) into master (5f580a1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #7931   +/-   ##
=======================================
  Coverage   54.17%   54.17%           
=======================================
  Files         612      612           
  Lines       38999    38999           
=======================================
  Hits        21129    21129           
  Misses      15697    15697           
  Partials     2173     2173           


# This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed
proto-gen-any:
@./scripts/protocgen-any.sh
docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh

proto-swagger-gen:
@./scripts/protoc-swagger-gen.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, this one still uses local protoc, because it relies to swagger-combine. I created #7933 to track this.

@amaury1093 amaury1093 requested a review from clevinson November 13, 2020 12:12
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

Looks that we've got proto linting :)

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Nov 13, 2020
@alessio alessio merged commit a8ef4a3 into master Nov 13, 2020
@alessio alessio deleted the am-contributing branch November 13, 2020 16:37
@alessio
Copy link
Contributor

alessio commented Nov 13, 2020

I've merged this in by hand as automerge does not work when there are changes in .github/workflows/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make proto-format fails
4 participants