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

Flag --incompatible_disable_starlark_host_transitions will break Flogger in Bazel 7.0 #326

Closed
keertk opened this issue Dec 15, 2022 · 6 comments
Labels
P3 type=other Miscellaneous activities not covered by other type= labels

Comments

@keertk
Copy link
Member

keertk commented Dec 15, 2022

Incompatible flag --incompatible_disable_starlark_host_transitions will be enabled by default in the next major release (Bazel 7.0), thus breaking Flogger. Please migrate to fix this and unblock the flip of this flag.

The flag is documented here: bazelbuild/bazel#17032.

Please check the following CI builds for build and test results:

Never heard of incompatible flags before? We have documentation that explains everything.
If you have any questions, please file an issue in https://github.com/bazelbuild/continuous-integration.

@cgdecker
Copy link
Member

I'm not sure what action I need to take here, or even what the issue is exactly. I look at that CI build and see Flogger passing. cfg = doesn't seem to appear anywhere in this project, if I'm understanding correctly that that's what the source of the problem would be.

@cgdecker cgdecker added P3 type=other Miscellaneous activities not covered by other type= labels labels Dec 16, 2022
@cpovirk
Copy link
Member

cpovirk commented Dec 16, 2022

I don't see anything about this in the docs, but it looks like the "Running Bazel with all incompatible flags" section may be the one to look at:

(10:18:49) ERROR: Traceback (most recent call last):
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/597893fd3fd95fbb83dc062567de2d0a/external/google_bazel_common/tools/jarjar/jarjar.bzl", line 66, column 26, in <toplevel>
		"_jarjar": attr.label(
Error in label: 'cfg = "host"' is deprecated and should no longer be used. Please use 'cfg = "exec"' instead.

So presumably we need to fix it in bazel-common, similar to google/bazel-common#97 and google/bazel-common#37.

@cgdecker
Copy link
Member

Ah, right, forgot about bazel-common.

@cgdecker
Copy link
Member

Ok, already fixed in bazel-common: google/bazel-common@b89cd87

Need to update the version Flogger's using, then.

copybara-service bot pushed a commit that referenced this issue Dec 16, 2022
Fixes #326.

RELNOTES=n/a
PiperOrigin-RevId: 495950468
@keertk
Copy link
Member Author

keertk commented Jan 30, 2023

Hi @cgdecker thanks for looking into this!
I'm unfortunately still seeing failures. Could you please check/reopen?
https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/1411#01860033-b97f-43b2-86bf-10dd912ce2e5

Running Bazel with --incompatible_disable_starlark_host_transitions | 0s
-- | --
  |  
  | bazel build --show_progress_rate_limit=5 --curses=yes --color=yes --terminal_columns=143 --show_timestamps --verbose_failures --jobs=30 --announce_rc --experimental_repository_cache_hardlinks --disk_cache= --sandbox_tmpfs_path=/tmp --google_default_credentials --remote_cache=remotebuildexecution.googleapis.com --remote_instance_name=projects/bazel-untrusted/instances/default_instance --remote_timeout=60 --remote_max_connections=200 --remote_default_platform_properties=properties:{name:"cache-silo-key" value:"8d289f2a1cea83df66f90efee75da8dc615b199c80f262fa30a652f2d174a951"} --test_env=HOME --test_env=BAZELISK_USER_AGENT --test_env=USE_BAZEL_VERSION --incompatible_disable_starlark_host_transitions -- //...
  | (01:04:18) WARNING: Option 'remote_default_platform_properties' is deprecated: --remote_default_platform_properties has been deprecated in favor of --remote_default_exec_properties.
  | (01:04:18) INFO: Invocation ID: acc6cd0e-2343-4f3e-ba9a-c0fdf64c39e6
  | (01:04:18) INFO: Options provided by the client:
  | Inherited 'common' options: --isatty=1 --terminal_columns=0
  | (01:04:18) INFO: Reading rc options for 'build' from /var/lib/buildkite-agent/builds/bk-docker-g5zx/bazel-downstream-projects/flogger/.bazelrc:
  | 'build' options: --javacopt=-g --host_javacopt=-g
  | (01:04:18) WARNING: Option 'remote_default_platform_properties' is deprecated: --remote_default_platform_properties has been deprecated in favor of --remote_default_exec_properties.
  | (01:04:18) INFO: Current date is 2023-01-30
  | (01:04:18) ERROR: Traceback (most recent call last):
  | File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/1b836c052c8b7c367cd9598095c176ef/external/google_bazel_common/tools/jarjar/jarjar.bzl", line 66, column 26, in <toplevel>
  | "_jarjar": attr.label(
  | Error in label: 'cfg = "host"' is deprecated and should no longer be used. Please use 'cfg = "exec"' instead.
  | (01:04:18) ERROR: Skipping '//...': error loading package under directory '': error loading package 'api': initialization of module 'tools/jarjar/jarjar.bzl' failed
  | (01:04:18) WARNING: Target pattern parsing failed.
  | (01:04:18) ERROR: error loading package under directory '': error loading package 'api': initialization of module 'tools/jarjar/jarjar.bzl' failed
  | (01:04:18) INFO: Elapsed time: 0.269s
  | (01:04:18) INFO: 0 processes.
  | (01:04:18) ERROR: Build did NOT complete successfully

@sgowroji
Copy link

Hi @cgdecker, This Error is still persists in the latest CI . Can you please reopen it.

ERROR: Traceback (most recent call last):
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d8e6aef47df586180cb278e5cac67c00/external/google_bazel_common/tools/jarjar/jarjar.bzl", line 66, column 26, in <toplevel>
		"_jarjar": attr.label(
Error in label: 'cfg = "host"' is deprecated and should no longer be used. Please use 'cfg = "exec"' instead.
(01:13:11) INFO: Repository rules_java instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:414:6: in <toplevel>
  /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d8e6aef47df586180cb278e5cac67c00/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule http_archive defined at:
  /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d8e6aef47df586180cb278e5cac67c00/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in <toplevel>
(01:13:11) ERROR: Skipping '//...': error loading package under directory '': error loading package 'api': initialization of module 'tools/jarjar/jarjar.bzl' failed
(01:13:11) ERROR: error loading package under directory '': error loading package 'api': initialization of module 'tools/jarjar/jarjar.bzl' failed
(01:13:11) INFO: Elapsed time: 0.187s
(01:13:11) INFO: 0 processes.
(01:13:11) ERROR: Build did NOT complete successfully
(01:13:11) ERROR: Couldn't start the build. Unable to run tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 type=other Miscellaneous activities not covered by other type= labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants