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: deleting maven_jar broke downstream projects with bazel@head #10322

Closed
laszlocsomor opened this issue Nov 27, 2019 · 9 comments
Closed
Assignees

Comments

@laszlocsomor
Copy link
Contributor

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

Context: #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 (88126f8), because two others (6884507, 87da3f6) are built on it, and apparently the rollback isn't clean.

@laszlocsomor
Copy link
Contributor Author

@jin @dslomov @meisterT

@jin jin self-assigned this Nov 27, 2019
@jin
Copy link
Member

jin commented 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 #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.

@c-parsons
Copy link
Contributor

Any updates?

@jin
Copy link
Member

jin commented Dec 6, 2019

All of the known failures have been migrated. Will wait for tonight's downstream to confirm.

@laszlocsomor
Copy link
Contributor Author

Awesome @jin , thank you!

@jin
Copy link
Member

jin commented Dec 6, 2019

The remaining failures are not maven_jar related.

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1306

@jin jin closed this as completed Dec 6, 2019
@senpo
Copy link

senpo commented Jan 30, 2020

I found the removal of maven_jar also breaks https://github.com/bazelbuild/tools_android, which we use to build firebase android apps. Is the tools_android repo still maintained?

ERROR: /private/var/tmp/_bazel_senpo/8e8ab08dfe8b1ede4ab2e2dba795577f/external/tools_android/tools/googleservices/defs.bzl:36:3: Traceback (most recent call last): File "/Users/senpo/Sources/github/senpo/senpo-mono/workspace/WORKSPACE", line 81 google_services_workspace_dependencies() File "/private/var/tmp/_bazel_senpo/8e8ab08dfe8b1ede4ab2e2dba795577f/external/tools_android/tools/googleservices/defs.bzl", line 36, in google_services_workspace_dependencies native.maven_jar(<2 more arguments>) type 'struct' has no method maven_jar()

@senpo
Copy link

senpo commented Jan 30, 2020

Never mind. I found these changes that fix the issue. Cool.
https://github.com/bazelbuild/examples/commits/master/android/firebase-cloud-messaging/WORKSPACE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants