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

[Bazel CI] Error in resolve_tools: Pass an executable or tools argument to ctx.actions.run #18328

Closed
sgowroji opened this issue Sep 16, 2024 · 5 comments
Labels
inactive Denotes the issue/PR has not seen activity in the last 90 days.

Comments

@sgowroji
Copy link

sgowroji commented Sep 16, 2024

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4128#0191f902-9764-49ee-9ba8-fad90dce3287

Platform: MacOS

Logs:

 ERROR: /Users/buildkite/builds/bk-macos-pln3-g50m/bazel-org-repo-root/protobuf/java/kotlin/BUILD.bazel:31:15: in kt_jvm_library rule //java/kotlin:only_for_use_in_proto_generated_code_its_generator_and_tests:
Traceback (most recent call last):
	File "/private/var/tmp/_bazel_buildkite/aa3bb90c38b0f4c47984e8f6f52da588/external/rules_kotlin/kotlin/internal/jvm/impl.bzl", line 222, column 36, in kt_jvm_library_impl
		_kt_jvm_produce_jar_actions(ctx, "kt_jvm_library") if ctx.attr.srcs or ctx.attr.resources else export_only_providers(
	File "/private/var/tmp/_bazel_buildkite/aa3bb90c38b0f4c47984e8f6f52da588/external/rules_kotlin/kotlin/internal/jvm/compile.bzl", line 549, column 50, in kt_jvm_produce_jar_actions
		outputs_struct = _run_kt_java_builder_actions(
	File "/private/var/tmp/_bazel_buildkite/aa3bb90c38b0f4c47984e8f6f52da588/external/rules_kotlin/kotlin/internal/jvm/compile.bzl", line 729, column 31, in _run_kt_java_builder_actions
		_run_kt_builder_action(
	File "/private/var/tmp/_bazel_buildkite/aa3bb90c38b0f4c47984e8f6f52da588/external/rules_kotlin/kotlin/internal/jvm/compile.bzl", line 485, column 47, in _run_kt_builder_action
		tools, input_manifests = ctx.resolve_tools(
Error in resolve_tools: Pass an executable or tools argument to ctx.actions.run or ctx.actions.run_shell instead of calling ctx.resolve_tools.
Use --noincompatible_disallow_ctx_resolve_tools to temporarily disable this check.
(06:08:51) ERROR: /Users/buildkite/builds/bk-macos-pln3-g50m/bazel-org-repo-root/protobuf/java/kotlin/BUILD.bazel:31:15: Analysis of target '//java/kotlin:only_for_use_in_proto_generated_code_its_generator_and_tests' failed
Target //java/internal:java_version failed to build
(06:08:51) ERROR: Analysis of target '//java/kotlin:test_extensions' failed; build aborted: Analysis failed
(06:08:51) INFO: Elapsed time: 47.438s, Critical Path: 0.07s
(06:08:51) INFO: 1 process: 1 internal.
(06:08:51) ERROR: Build did NOT complete successfully

Culprit:

Steps:

 git clone https://github.com/google/protobuf
git reset 372ddb308be33fed837043a2446f7b2305dcb075  --hard
export USE_BAZEL_VERSION=7b8d07253adf84d5e3d46ac915a1440e518fab3c
bazel test //:all //java/... 

CC Greenteam @comius

@sgowroji
Copy link
Author

 bazelbuild/bazel#22249 for more context. CC @tjgq

@tjgq
Copy link
Contributor

tjgq commented Sep 17, 2024

This has been fixed in rules_kotlin at head (the commit that fixed it was bazelbuild/rules_kotlin@d5b0308). Can protobuf upgrade to a newer version?

@sgowroji
Copy link
Author

@haberman @mkruskal-google Could you please take a look at this comment. Thanks!

Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Dec 17, 2024
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Denotes the issue/PR has not seen activity in the last 90 days.
Projects
None yet
Development

No branches or pull requests

2 participants