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

Android Testing failing on Bazel CI #226

Closed
meteorcloudy opened this issue Dec 5, 2018 · 5 comments
Closed

Android Testing failing on Bazel CI #226

meteorcloudy opened this issue Dec 5, 2018 · 5 comments
Assignees

Comments

@meteorcloudy
Copy link

meteorcloudy commented Dec 5, 2018

https://buildkite.com/bazel/bazel-at-release-plus-incompatible-flags/builds/13#6dd83578-ede3-4bf4-bd29-fc6d6a6f66e8
Android Testing is failing with Bazel@Release + incompatible flags due to

ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/34bf6870dfb715fb6ec0e0d81121469e/external/protobuf_archive/BUILD.bazel:605:1: Traceback (most recent call last):
--
  | File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/34bf6870dfb715fb6ec0e0d81121469e/external/protobuf_archive/BUILD.bazel", line 605
  | internal_gen_well_known_protos_java(srcs = WELL_KNOWN_PROTOS)
  | File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/34bf6870dfb715fb6ec0e0d81121469e/external/protobuf_archive/protobuf.bzl", line 266, in internal_gen_well_known_protos_java
  | Label(("%s//protobuf_java" % REPOSITOR...))
  | File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/34bf6870dfb715fb6ec0e0d81121469e/external/protobuf_archive/protobuf.bzl", line 266, in Label
  | REPOSITORY_NAME
  | The value 'REPOSITORY_NAME' has been removed in favor of 'repository_name()', please use the latter (https://docs.bazel.build/versions/master/skylark/lib/native.html#repository_name). You can temporarily allow the old name by using --incompatible_package_name_is_a_function=false

However, it is passing with Bazel@HEAD, where --incompatible_package_name_is_a_function is already flipped to true.

I don't understand why this is happening, is android_test_support embedded in Bazel binary and depends on protobuf? @jin

@meteorcloudy
Copy link
Author

Ah, I see we have --incompatible_package_name_is_a_function=false in the config file

This flag is removed recently at bazelbuild/bazel@2b3ad18, so please remove them from config file.

@meteorcloudy
Copy link
Author

You can now upgrade protobuf to 3.6.1.2
https://github.com/protocolbuffers/protobuf/releases/tag/v3.6.1.2

@jin jin self-assigned this Dec 5, 2018
@jin
Copy link
Collaborator

jin commented Dec 5, 2018

Yes, we had the same problem where protobuf was updated and we had to test on the latest Bazel where the incompatible change with REPOSITORY_NAME was enabled. That is why I added the flag workaround.

Will look into this.

@jin
Copy link
Collaborator

jin commented Dec 5, 2018

@meteorcloudy Not quite -- 3.6.1.2 is just a tag, but we depend on the individual language releases. The latest release is still 3.6.1 https://github.com/protocolbuffers/protobuf/releases

copybara-androidxtest pushed a commit to android/android-test that referenced this issue Dec 6, 2018
--
224340571 by jingwen <jingwen@google.com>:

Update protobuf version in @android_test_support to be compliant with Bazel breaking changes.

Bazel HEAD removed the --incompatible_package_name_is_a_function flag, causing upstream protobuf older than 3.6.1 to completely fail to build. This CL updates @android_test_support's protobuf version to 3.6.1.2, which builds with Bazel HEAD.

See android/testing-samples#226

PiperOrigin-RevId: 224340571
copybara-androidxtest pushed a commit to android/android-test that referenced this issue Dec 6, 2018
… Bazel breaking changes.

Bazel HEAD removed the --incompatible_package_name_is_a_function flag, causing upstream protobuf older than 3.6.1 to completely fail to build. This CL updates @android_test_support's protobuf version to 3.6.1.2, which builds with Bazel HEAD.

See android/testing-samples#226
Also see #147

PiperOrigin-RevId: 224340571
copybara-androidxtest pushed a commit to android/android-test that referenced this issue Dec 6, 2018
… Bazel breaking changes.

Bazel HEAD removed the --incompatible_package_name_is_a_function flag, causing upstream protobuf older than 3.6.1 to completely fail to build. This CL updates @android_test_support's protobuf version to 3.6.1.2, which builds with Bazel HEAD.

See android/testing-samples#226
Also see #147

PiperOrigin-RevId: 224340571
copybara-androidxtest pushed a commit to android/android-test that referenced this issue Dec 6, 2018
… Bazel breaking changes.

Bazel HEAD removed the --incompatible_package_name_is_a_function flag, causing upstream protobuf older than 3.6.1 to completely fail to build. This CL updates @android_test_support's protobuf version to 3.6.1.2, which builds with Bazel HEAD.

See android/testing-samples#226
Also see #147

PiperOrigin-RevId: 224356109
@jin
Copy link
Collaborator

jin commented Dec 7, 2018

We can close this now 😄

@jin jin closed this as completed Dec 7, 2018
rauljurado620 added a commit to rauljurado620/test-android-project that referenced this issue Mar 24, 2022
… Bazel breaking changes.

Bazel HEAD removed the --incompatible_package_name_is_a_function flag, causing upstream protobuf older than 3.6.1 to completely fail to build. This CL updates @android_test_support's protobuf version to 3.6.1.2, which builds with Bazel HEAD.

See android/testing-samples#226
Also see android/android-test#147

PiperOrigin-RevId: 224356109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants