kubernetes-sigs / cluster-api-provider-aws

Kubernetes Cluster API Provider AWS provides consistent deployment and day 2 operations of "self-managed" and EKS Kubernetes clusters on AWS.
http://cluster-api-aws.sigs.k8s.io/
Apache License 2.0
632 stars 558 forks source link

Mock generation broken with Bazel 0.27 #845

Closed detiber closed 5 years ago

detiber commented 5 years ago

/kind bug

What steps did you take and what happened:

Using bazel 0.27 run make generate returns the following error:

...
bazel build  //pkg/cloud/aws/services/mocks:mocks \
        //pkg/cloud/aws/services/ec2/mock_ec2iface:mocks \
        //pkg/cloud/aws/services/elb/mock_elbiface:mocks
ERROR: /home/detiber/go/src/sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/services/ec2/mock_ec2iface/BUILD.bazel:4:1: in _gomock_prog_gen rule //pkg/
cloud/aws/services/ec2/mock_ec2iface:mocks_gomock_prog: 
Traceback (most recent call last):
        File "/home/detiber/go/src/sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/services/ec2/mock_ec2iface/BUILD.bazel", line 4
                _gomock_prog_gen(name = 'mocks_gomock_prog')
        File "/home/detiber/.cache/bazel/_bazel_detiber/7a0a2696f05ff17e347df52b64ee5c15/external/bazel_gomock/gomock.bzl", line 141, in _gomock_prog_gen_impl
                ctx.actions.run_shell(outputs = [out], inputs = [cmd], com...))
Found tool(s) 'bazel-out/host/bin/external/com_github_golang_mock/mockgen/linux_amd64_stripped/mockgen' in inputs. A tool is an input with executable=True set. All tools should be passed using the 'tools' argument instead of 'inputs' in order to make their runfiles available to the action. This safety check will not be performed once the action is modified to take a 'tools' argument. To temporarily disable this check, set --incompatible_no_support_tools_in_action_inputs=false.
ERROR: Analysis of target '//pkg/cloud/aws/services/ec2/mock_ec2iface:mocks' failed; build aborted: Analysis of target '//pkg/cloud/aws/services/ec2/mock_
ec2iface:mocks_gomock_prog' failed; build aborted
INFO: Elapsed time: 1.996s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (140 packages loaded, 1096 targets configured)

What did you expect to happen:

Mocks to be regenerated

Anything else you would like to add: There is an upstream PR to bazel_gomocks to resolve this issue: https://github.com/jmhodges/bazel_gomock/pull/19

detiber commented 5 years ago

/assign /priority important-soon /milestone Next

ncdc commented 5 years ago

Jason to doublecheck & close if appropriate

detiber commented 5 years ago

I can no longer reproduce this. /close

k8s-ci-robot commented 5 years ago

@detiber: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/845#issuecomment-511513937): >I can no longer reproduce this. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.