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

Use Docker to generate swagger files #9064

Merged
merged 4 commits into from
Apr 7, 2021
Merged

Use Docker to generate swagger files #9064

merged 4 commits into from
Apr 7, 2021

Conversation

hallazzang
Copy link
Contributor

Description

Use Docker to generate swagger files.
Also change deprecated commands to new commands and re-generate protobuf stubs and swagger documentation using make proto-gen and make proto-swagger-gen.

closes: #7933


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

@tac0turtle tac0turtle added the A:automerge Automatically merge PR once all prerequisites pass. label Apr 7, 2021
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

How did you test?

make proto-swagger-gen
/usr/local/bin/docker run --rm -v /Users/amaury/Workspace/regen/cosmos-sdk:/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protoc-swagger-gen.sh
Unable to find image 'tendermintdev/sdk-proto-gen:latest' locally
latest: Pulling from tendermintdev/sdk-proto-gen
ba3557a56b15: Pull complete 
34a078c6c131: Pull complete 
e78f90fd1d94: Pull complete 
efdc4f024afd: Pull complete 
74b7f786c072: Pull complete 
e056034dfc96: Pull complete 
9c8b2c21c4ca: Pull complete 
ab2da8730ae7: Pull complete 
Digest: sha256:372dce7be2f465123e26459973ca798fc489ff2c75aeecd814c0ca8ced24faca
Status: Downloaded newer image for tendermintdev/sdk-proto-gen:latest
./scripts/protoc-swagger-gen.sh: line 24: swagger-combine: not found
make: *** [proto-swagger-gen] Error 127

@hallazzang
Copy link
Contributor Author

hallazzang commented Apr 7, 2021

@AmauryM Sorry, I forgot to mention about that. I've found that tendermintdev/sdk-proto-gen docker image is built when contrib/devtools/dockerfile updated, so I changed that file and built docker image manually on local computer using:

$ docker build -t tendermintdev/sdk-proto-gen:v0.1 ./contrib/devtools
$ docker tag tendermintdev/sdk-proto-gen:v0.1 tendermintdev/sdk-proto-gen:latest

After this pull request has merged, the image on Docker Hub will be updated too and make commands will work fine.

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

utACK, will test after the registry is updated

@mergify mergify bot merged commit 9b41ba7 into cosmos:master Apr 7, 2021
@amaury1093
Copy link
Contributor

Thanks @hallazzang for the PR!

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.

Use Docker to generate swagger files
3 participants