question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bazel CI: deleting maven_jar broke downstream projects with bazel@head

See original GitHub issue

Deleting the deprecated maven_jar rule broke several Bazel CI downstream projects we build with Bazel@HEAD. (These projects were apparently not migrated.)

Context: https://github.com/bazelbuild/bazel/pull/10237

Examples: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1294#cbe4d084-810d-4349-aedd-a938fbcbf8b2 https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1294#1210713f-262e-4363-a30c-f4dcd14d7d00

/tmp/tmpai0tx989/bazel-bin/src/bazel --nomaster_bazelrc --bazelrc=/dev/null info
--
  | ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/a54b96b5dc1b1db87092e917fef4e796/external/build_bazel_integration_testing/tools/bazel_java_integration_test.bzl:161:3: Traceback (most recent call last):
  | File "/var/lib/buildkite-agent/builds/bk-docker-dvg0/bazel-downstream-projects/intellij/WORKSPACE", line 281
  | bazel_java_integration_test_deps(<1 more arguments>)
  | File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/a54b96b5dc1b1db87092e917fef4e796/external/build_bazel_integration_testing/tools/bazel_java_integration_test.bzl", line 161, in bazel_java_integration_test_deps
  | native.maven_jar(<2 more arguments>)
  | type 'struct' has no method maven_jar()
  | ERROR: error loading package '': Encountered error while reading extension file 'protobuf_deps.bzl': no such package '@com_google_protobuf//': error loading package 'external': Could not load //external package
  | Traceback (most recent call last):
  | File "bazelci.py", line 2887, in <module>
  | sys.exit(main())
  | File "bazelci.py", line 2867, in main
  | bazel_version=task_config.get("bazel") or configs.get("bazel"),
  | File "bazelci.py", line 831, in execute_commands
  | bazel_version = print_bazel_version_info(bazel_binary, platform)
  | File "bazelci.py", line 1048, in print_bazel_version_info
  | + ["--nomaster_bazelrc", "--bazelrc=/dev/null", "info"]
  | File "bazelci.py", line 1689, in execute_command
  | args, shell=shell, check=fail_if_nonzero, env=os.environ, cwd=cwd
  | File "/usr/local/lib/python3.6/subprocess.py", line 438, in run
  | output=stdout, stderr=stderr)
  | subprocess.CalledProcessError: Command '['/tmp/tmpai0tx989/bazel-bin/src/bazel', '--nomaster_bazelrc', '--bazelrc=/dev/null', 'info']' returned non-zero exit status 2.

Unfortunately it’s not easy to roll back the culprit commit (88126f8ef345aeb20f2271b23a6a7100202b63fa), because two others (6884507aca322fa18afa39512a2a6177f2423ef5, 87da3f63b25a65505468bd55bc6158f511a05cac) are built on it, and apparently the rollback isn’t clean.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
laszlocsomorcommented, Dec 6, 2019

Awesome @jin , thank you!

1reaction
jincommented, Nov 27, 2019

It looks like deleting maven_jar != flipping the incompatible change flag, and has a much wider impact that then downstream tests I did in https://github.com/bazelbuild/bazel/pull/10090 and https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1251#4a75bdb5-0eba-494a-afaa-39b6f3112c7b

I’ll see what I can do, especially on the migration tooling front.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide for rolling out breaking changes - Bazel
It is inevitable that we will make breaking changes to Bazel. ... Bazel CI tests a list of important projects at Bazel@HEAD +...
Read more >
Bazel's new CI has arrived. Jenkins is gone. - Google Groups
This will allow us to test Bazel more often and consistently against downstream projects to ensure that we never accidentally break your use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found