rules-proto-grpc / rules_proto_grpc

Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
https://rules-proto-grpc.com
Apache License 2.0
250 stars 157 forks source link

Failed to build `gateway_grpc_library`: `_plugin_fixed_grpc_go_plugin/: No such file or directory` #249

Closed tastynoodle closed 1 year ago

tastynoodle commented 1 year ago

Issue Description

Hi, I was trying to build the grpc gateway lib with gateway_grpc_library, but hit some file missing error. I wonder what could be the problem here?

Log Output

shengpei.zhang src/admission_control  bazel build //admission_control/proto:gateway_lib
INFO: Invocation ID: b81f0372-a5e1-11ed-98f7-42010ad8607c
INFO: Analyzed target //admission_control/proto:gateway_lib (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/shengpei.zhang/admission_control/proto/BUILD:10:21: Compiling protoc outputs for grpc_go_plugin plugin on target //admission_control/proto:gateway_lib_pb failed: (Exit 1): bash failed: error executing command /bin/bash -c 'mkdir -p '\''bazel-out/k8-fastbuild/bin/admission_control/proto/_rpg_premerge_gateway_lib_pb'\'' && bazel-out/host/bin/external/com_google_protobuf/protoc $@' '' ... (remaining 4 argument(s) skipped)
Remote action 44d255c26795799e14ac6bd10c9b465ec0f3a9c712ba7ab6ba953e5c4db042a1/395 failed with action exit code 1 and gRPC status 0
bazel-out/k8-fastbuild/bin/admission_control/proto/_rpg_premerge_gateway_lib_pb/_plugin_fixed_grpc_go_plugin/: No such file or directory
Target //admission_control/proto:gateway_lib failed to build
Use --verbose_failures to see the command lines of failed build steps.

rules_proto_grpc Version

4.1.0

Bazel Version

4.2.1

OS

Ubuntu 18.04.6 LTS

Link to Demo Repo

No response

WORKSPACE Content

No response

BUILD Content

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc//grpc-gateway:defs.bzl", "gateway_grpc_library")

gateway_grpc_library(
    name = "gateway_lib",
    importpath = "github.robot.car/<some_path>/admission-control/proto",
    protos = [":proto_lib"],
)

proto_library(
    name = "proto_lib",
    srcs = ["admission_control.proto"],
    deps = ["@go_googleapis//google/api:annotations_proto"],
)

Proto Content

No response

Any Other Content

No response

aaliddell commented 1 year ago

The example BUILD looks like it should work. I notice in the error that you are using remote build; does the error still occur if you build locally only? If so, perhaps this is a RBE bug for which I don't currently have a good mechanism for testing.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.