Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible_no_support_tools_in_action_inputs: Enforce action tools are passed using 'tools' and not 'inputs'. #5826

Closed
c-parsons opened this issue Aug 8, 2018 · 5 comments
Assignees
Labels
incompatible-change Incompatible/breaking change P1 I'll work on this now. (Assignee required)

Comments

@c-parsons
Copy link
Contributor

This is a tracking issue for offering a migration solution for
--incompatible_no_support_tools_in_action_inputs

This flag would change e.g. ctx.actions.run() and ctx.actions.run_shell() to enforce action tools are passed using 'tools' and not 'inputs'. (An error is thrown if any tools appear in 'inputs'

@c-parsons c-parsons self-assigned this Aug 8, 2018
@laurentlb laurentlb added team-Starlark incompatible-change Incompatible/breaking change P1 I'll work on this now. (Assignee required) and removed category: extensibility > skylark labels Nov 21, 2018
@laurentlb laurentlb changed the title Enforce action tools are passed using 'tools' and not 'inputs'. incompatible_no_support_tools_in_action_inputs: Enforce action tools are passed using 'tools' and not 'inputs'. Jan 9, 2019
@dslomov
Copy link
Contributor

dslomov commented Jan 31, 2019

@c-parsons when do you intend to flip the flag?

@laurentlb
Copy link
Contributor

Still blocked by Tensorflow, rules_k8s, Cloud Robotics Core, Bazel Watcher, Baze;l Remote Cache. All of them have been pinged.

@laurentlb
Copy link
Contributor

https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/67

@c-parsons Can you see how to fix Bazel? (looks like we need to update something in third-party)

I'll ping the other projects.

@meteorcloudy
Copy link
Member

Looks like the latest protobuf release is still broken with this flag

pcloudy@pcloudy:~/workspace/tensorflow
$ bazelisk  build --config=opt //tensorflow/tools/pip_package:build_pip_package --incompatible_no_support_tools_in_action_inputs
INFO: Build option --incompatible_windows_escape_jvm_flags has changed, discarding analysis cache.
ERROR: /usr/local/google/home/pcloudy/workspace/tensorflow/tensorflow/contrib/rpc/python/kernel_tests/BUILD:13:1: in proto_gen rule //tensorflow/contrib/rpc/python/kernel_tests:test_example_proto_py_genproto: 
Traceback (most recent call last):
        File "/usr/local/google/home/pcloudy/workspace/tensorflow/tensorflow/contrib/rpc/python/kernel_tests/BUILD", line 13
                proto_gen(name = 'test_example_proto_py_genproto')
        File "/usr/local/google/home/pcloudy/.cache/bazel/_bazel_pcloudy/d2f15366e3b15100d3593f2d595721a3/external/protobuf_archive/protobuf.bzl", line 137, in _proto_gen_impl
                ctx.actions.run(inputs = inputs, outputs = outs, arg...]), <3 more arguments>)
Found tool(s) 'bazel-out/host/bin/external/grpc/grpc_python_plugin' 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 '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: Analysis of target '//tensorflow/contrib/rpc/python/kernel_tests:test_example_proto_py_genproto' failed; build aborted
INFO: Elapsed time: 1.691s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (291 packages loaded, 6072 targets configured)

Is there a fix for that?

meteorcloudy added a commit to meteorcloudy/protobuf that referenced this issue Jun 4, 2019
This is another fix for `--incompatible_no_support_tools_in_action_inputs`
bazelbuild/bazel#5826

TensorFlow is broken due to this:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1014#f7a58799-a361-4087-82fb-f0c54ed2be49
```
Traceback (most recent call last):
	File "/var/lib/buildkite-agent/builds/bk-docker-g96n/bazel-downstream-projects/tensorflow/tensorflow/contrib/rpc/python/kernel_tests/BUILD", line 14
		proto_gen(name = 'test_example_proto_py_genproto')
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/ad505fa787dc3fe473b54762d1a7f9ae/external/protobuf_archive/protobuf.bzl", line 137, in _proto_gen_impl
		ctx.actions.run(inputs = inputs, outputs = outs, arg...]), <3 more arguments>)
Found tool(s) 'bazel-out/host/bin/external/grpc/grpc_python_plugin' 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.
```
irengrig pushed a commit to irengrig/bazel that referenced this issue Jun 18, 2019
Fixes bazelbuild#5826

RELNOTES: Flip --incompatible_no_support_tools_in_action_inputs
PiperOrigin-RevId: 250930436
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 25, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 26, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 26, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 26, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 26, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 26, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 26, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
guibou added a commit to tweag/rules_haskell that referenced this issue Jun 27, 2019
Executables must be passed as `tools` instead of `inputs`.

See: bazelbuild/bazel#5826
irengrig pushed a commit to irengrig/bazel that referenced this issue Jul 15, 2019
Fixes bazelbuild#5826

RELNOTES: Flip --incompatible_no_support_tools_in_action_inputs
PiperOrigin-RevId: 250930436
@lberki
Copy link
Contributor

lberki commented Jul 22, 2019

this breaks rules_scala: https://travis-ci.org/bazelbuild/rules_scala/builds/561953949

How was this flag flipped then?

lucamilanesio pushed a commit to GerritCodeReview/gerrit that referenced this issue Sep 8, 2019
Bazel version 0.29 flipped the bit for this option:
--incompatible_no_support_tools_in_action_inputs to ensure, that tools
are not used in input, but instead passed as new parameter tools: [1].

Change I744ae1b28a already fixed some places, but missed the place
fixed in this change. The problem shows up when debugging of GWT code
with Bazel 0.27 and later.

Test Plan:

  $ bazel build //gerrit-gwtui:ui_safari

[1] bazelbuild/bazel#5826

Change-Id: I491d70361444e4fb41a1dc2b7dbe422969c090ff
csamak added a commit to csamak/rules_purescript that referenced this issue Apr 1, 2020
Replace native.new_http_archive with http_archive since new_http_archive is deprecated/removed.
depsets are no longer iterable
(https://docs.bazel.build/versions/0.24.0/skylark/backward-compatibility.html#depset-is-no-longer-iterable).
Pass purs in tools and not inputs
(bazelbuild/bazel#5826).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incompatible-change Incompatible/breaking change P1 I'll work on this now. (Assignee required)
Projects
None yet
Development

No branches or pull requests

6 participants