Skip to content

(lack of) protogen-grpc tool fails make generate command #2816

@ItsGamerik

Description

@ItsGamerik

Describe the bug

when building opencloud from source (since 7.0.0-rc0?), the make generate command tries to run protoc-gen-go-grpc.
This fails with

generating protobuf content
cd ../../protogen/proto && /root/go/bin/buf-v1.39.0 generate
Failure: plugin go-grpc: exec: "../../.bingo/protoc-gen-go-grpc": stat ../../.bingo/protoc-gen-go-grpc: no such file or directory
make[1]: Leaving directory '/workspace/erik/apkbuilds/apkbuilds/opencloud/src/opencloud-7.0.0/services/settings'
make[1]: *** [../../.make/protobuf.mk:23: /workspace/erik/apkbuilds/apkbuilds/opencloud/src/opencloud-7.0.0/protogen/buf.sha1.lock] Error 1
make: *** [Makefile:141: generate-prod] Error 1
>>> ERROR: opencloud: build failed

Steps to reproduce

  1. clone repository
  2. run make generate
  3. observe the build failure

Expected behavior

The generation step should install the tool and run it

Actual behavior

The tool is not installed and the build returns code 1

Additional context

I am currently using this patch to work around this:

--- a/.make/protobuf.mk
+++ b/.make/protobuf.mk
@@ -11,6 +11,7 @@ protoc-deps: $(BINGO)
     @cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb
     @cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
     @cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/favadi/protoc-go-inject-tag
+    @cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/grpc/cmd/protoc-gen-go-grpc
 

for some reason this does not fail the build pipeline in this repo:
example

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Qualification

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions