From 1cc816a3b3472c7dd4b5045cced5d54ba61fbf9d Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Mon, 23 Oct 2023 11:20:38 +0300 Subject: [PATCH] Updated buf action and use go to execute buf cli --- .github/workflows/docker-publish-exp-image.yaml | 2 +- .github/workflows/docker-publish.yaml | 2 +- .github/workflows/test.yaml | 2 +- Makefile | 9 ++++----- pkg/plugins/diff/table_diff.pb.go | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-publish-exp-image.yaml b/.github/workflows/docker-publish-exp-image.yaml index 5c61c4ab1df..10c23a994ff 100644 --- a/.github/workflows/docker-publish-exp-image.yaml +++ b/.github/workflows/docker-publish-exp-image.yaml @@ -43,7 +43,7 @@ jobs: go-version: "1.20.6" id: go - - uses: bufbuild/buf-setup-action@v1.27.0 + - uses: bufbuild/buf-setup-action@v1.27.1 - name: Extract version shell: bash diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 2cf942d949c..83da5e3e466 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -33,7 +33,7 @@ jobs: go-version: "1.20.6" id: go - - uses: bufbuild/buf-setup-action@v1.27.0 + - uses: bufbuild/buf-setup-action@v1.27.1 - name: Extract version shell: bash diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0611a627e30..9bcc989f33d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,7 +18,7 @@ jobs: with: go-version: "1.20.6" id: go - - uses: bufbuild/buf-setup-action@v1.27.0 + - uses: bufbuild/buf-setup-action@v1.27.1 - name: Generate code env: NODE_OPTIONS: "--max-old-space-size=4096" diff --git a/Makefile b/Makefile index 6d003fafc86..611fd49c614 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ OPENAPI_GENERATOR_IMAGE=openapitools/openapi-generator-cli:v7.0.0 OPENAPI_GENERATOR=$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_GENERATOR_IMAGE) GOLANGCI_LINT_VERSION=v1.53.3 +BUF_CLI_VERSION=v1.27.1 ifndef PACKAGE_VERSION PACKAGE_VERSION=0.1.0-SNAPSHOT @@ -104,6 +105,7 @@ gen-metastore: ## Run Metastore Code generation tools: ## Install tools $(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) + $(GOCMD) install github.com/bufbuild/buf/cmd/buf@$(BUF_CLI_VERSION) client-python: sdk-python-legacy sdk-python @@ -179,10 +181,7 @@ package: package-python .PHONY: gen-api gen-api: docs/assets/js/swagger.yml ## Run the swagger code generator - rm -f pkg/api/lakefs.gen.go - $(GOGENERATE) \ - ./pkg/api/apigen \ - ./pkg/auth + $(GOGENERATE) ./pkg/api/apigen ./pkg/auth .PHONY: gen-code gen-code: gen-api ## Run the generator for inline commands @@ -296,7 +295,7 @@ gen-ui: $(UI_DIR)/node_modules ## Build UI web app cd $(UI_DIR) && $(NPM) run build gen-proto: ## Build Protocol Buffers (proto) files using Buf CLI - buf generate + go run github.com/bufbuild/buf/cmd/buf@$(BUF_CLI_VERSION) generate publish-scala: ## sbt publish spark client jars to nexus and s3 bucket cd clients/spark && sbt assembly && sbt s3Upload && sbt "project root" publishSigned diff --git a/pkg/plugins/diff/table_diff.pb.go b/pkg/plugins/diff/table_diff.pb.go index 500b678aefb..59c65a1ebbb 100644 --- a/pkg/plugins/diff/table_diff.pb.go +++ b/pkg/plugins/diff/table_diff.pb.go @@ -1,7 +1,7 @@ // //Run from lakeFS root: -// protoc --proto_path=pkg/plugins/diff --go_out=pkg/plugins/diff --go_opt=paths=source_relative \ -// --go-grpc_out=pkg/plugins/diff --go-grpc_opt=paths=source_relative table_diff.proto +//protoc --proto_path=pkg/plugins/diff --go_out=pkg/plugins/diff --go_opt=paths=source_relative \ +//--go-grpc_out=pkg/plugins/diff --go-grpc_opt=paths=source_relative table_diff.proto // Code generated by protoc-gen-go. DO NOT EDIT. // versions: