From 20735e792c85a0d84ca32e97a0a3c814bcc3529f Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 21 Mar 2022 12:23:46 +0100 Subject: [PATCH] chore: fix proto docker (#11423) * fix proto docker * add back pull_request to test * push * push++ * revert --- .github/workflows/proto-docker.yml | 4 +--- Makefile | 2 +- .../feegrant/v1beta1/feegrant.pulsar.go | 4 ++-- api/cosmos/feegrant/v1beta1/tx.pulsar.go | 2 +- contrib/devtools/dockerfile | 20 ++++++++----------- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index 83dbd38bc..29578d59a 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -1,6 +1,5 @@ name: Build & Push SDK Proto Builder on: - pull_request: push: branches: - master @@ -40,7 +39,6 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - if: ${{ github.event_name != 'pull_request' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUBTM_USERNAME }} @@ -52,5 +50,5 @@ jobs: context: ./contrib/devtools file: ./contrib/devtools/dockerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.prep.outputs.tags }} diff --git a/Makefile b/Makefile index 315add753..037443990 100644 --- a/Makefile +++ b/Makefile @@ -393,7 +393,7 @@ devdoc-update: ### Protobuf ### ############################################################################### -protoVer=v0.3 +protoVer=v0.4 protoImageName=tendermintdev/sdk-proto-gen:$(protoVer) containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer) containerProtoGenAny=$(PROJECT_NAME)-proto-gen-any-$(protoVer) diff --git a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go index 0cc50a4b4..4136d147c 100644 --- a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go @@ -2730,7 +2730,7 @@ type AllowedMsgAllowance struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // allowance can be any of basic and filtered fee allowance. + // allowance can be any of basic and periodic fee allowance. Allowance *anypb.Any `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` // allowed_messages are the messages for which the grantee has the access. AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"` @@ -2780,7 +2780,7 @@ type Grant struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - // allowance can be any of basic and filtered fee allowance. + // allowance can be any of basic, periodic, allowed fee allowance. Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } diff --git a/api/cosmos/feegrant/v1beta1/tx.pulsar.go b/api/cosmos/feegrant/v1beta1/tx.pulsar.go index 473fef545..723d4319f 100644 --- a/api/cosmos/feegrant/v1beta1/tx.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/tx.pulsar.go @@ -1800,7 +1800,7 @@ type MsgGrantAllowance struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - // allowance can be any of basic and filtered fee allowance. + // allowance can be any of basic, periodic, allowed fee allowance. Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } diff --git a/contrib/devtools/dockerfile b/contrib/devtools/dockerfile index b16a34281..e95a15c27 100644 --- a/contrib/devtools/dockerfile +++ b/contrib/devtools/dockerfile @@ -1,4 +1,4 @@ -FROM bufbuild/buf:1.0.0-rc10 as BUILDER +FROM bufbuild/buf:1.1.0 as BUILDER FROM golang:alpine @@ -7,17 +7,13 @@ ENV GOLANG_PROTOBUF_VERSION=1.27.1 \ GRPC_GATEWAY_VERSION=1.14.7 -RUN GO111MODULE=on go get \ - github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest \ - google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogofast@v${GOGO_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} \ - github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest - -RUN GO111MODULE=on go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc +RUN GO111MODULE=on go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest +RUN GO111MODULE=on go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} +RUN GO111MODULE=on go install github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} +RUN GO111MODULE=on go install github.com/gogo/protobuf/protoc-gen-gogofast@v${GOGO_PROTOBUF_VERSION} +RUN GO111MODULE=on go install github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} +RUN GO111MODULE=on go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} +RUN GO111MODULE=on go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} RUN apk add --no-cache \ nodejs \