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 test //... on Linux is downloading JDKs for Windows, Mac Os and Linux ppc64le #12778

Closed
davido opened this issue Jan 6, 2021 · 3 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Rules-Java Issues for Java rules type: bug

Comments

@davido
Copy link
Contributor

davido commented Jan 6, 2021

Trying to run bazel test //... for Gerrit@Head with Bazel@HEAD (cfebb18) JDKs for ferign platforms are fetched:

  $ uname -a
  Linux localhost.localdomain 5.10.3-1

  $  java -fullversion
  openjdk full version "1.8.0_275-b01"

  $ git clone --recurse-submodules https://gerrit.googlesource.com/gerrit
  $ cd gerrit

  $ bazel test //...
  [....]

Analyzing: 183 targets (65 packages loaded, 2195 targets configured)
    Fetching @remotejdk11_linux_s390x; fetching 4s
    Fetching @remote_java_tools_darwin; fetching
    Fetching @remote_java_tools_windows; fetching
    Fetching @remotejdk11_macos; fetching
    Fetching @remotejdk11_win; fetching
    Fetching @remotejdk11_linux_aarch64; fetching
    Fetching @remotejdk11_linux_ppc64le; fetching
    Fetching ..._s390x; Extracting /home/davido/.cache/bazel/_bazel_davido/27a001f4182820ef315d8d2d4f1edafe/external/\


Analyzing: 183 targets (66 packages loaded, 2195 targets configured)
    Fetching @remote_java_tools_darwin; fetching 17s
    Fetching @remote_java_tools_windows; fetching 17s
    Fetching @remotejdk11_macos; fetching 17s
    Fetching @remotejdk11_win; fetching 17s
    Fetching @remotejdk11_linux_aarch64; fetching 17s
    Fetching @remotejdk11_linux_ppc64le; fetching 17s
    Fetching ...pc64le; Extracting /home/davido/.cache/bazel/_bazel_davido/27a001f4182820ef315d8d2d4f1edafe/external/\
remotejdk11_linux_ppc64le/temp14401437873842827563/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz


Analyzing: 183 targets (67 packages loaded, 2195 targets configured)
    Fetching @remote_java_tools_darwin; fetching 24s
    Fetching @remote_java_tools_windows; fetching 24s
    Fetching @remotejdk11_macos; fetching 24s
    Fetching @remotejdk11_win; fetching 24s
    Fetching @remotejdk11_linux_aarch64; fetching 24s


Analyzing: 183 targets (67 packages loaded, 2195 targets configured)
    Fetching @remote_java_tools_darwin; fetching 30s
    Fetching @remote_java_tools_windows; fetching 30s
    Fetching @remotejdk11_macos; fetching 30s
    Fetching @remotejdk11_win; fetching 30s
    Fetching @remotejdk11_linux_aarch64; fetching 30s
    Fetching ...arch64; Extracting /home/davido/.cache/bazel/_bazel_davido/27a001f4182820ef315d8d2d4f1edafe/external/\
remotejdk11_linux_aarch64/temp12031334436655755/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz 4s


Analyzing: 183 targets (68 packages loaded, 2195 targets configured)
    Fetching @remote_java_tools_darwin; fetching 37s
    Fetching @remote_java_tools_windows; fetching 37s
    Fetching @remotejdk11_macos; fetching 37s
    Fetching @remotejdk11_win; fetching 37s
    Fetching ...11_win; Extracting /home/davido/.cache/bazel/_bazel_davido/27a001f4182820ef315d8d2d4f1edafe/external/\
remotejdk11_win/temp6105216488250807618/zulu11.37.17-ca-jdk11.0.6-win_x64.zip


Analyzing: 183 targets (69 packages loaded, 2195 targets configured)
    Fetching @remote_java_tools_darwin; fetching 44s
    Fetching @remote_java_tools_windows; fetching 44s
    Fetching @remotejdk11_macos; fetching 44s

I wouldn't expect, that foreign JDKs are fetched: @remotejdk11_macos, @remotejdk11_macos, @remotejdk11_win and @remotejdk11_linux_ppc64le.

@aiuto aiuto added untriaged team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website labels Jan 7, 2021
@philwo philwo added P2 We'll consider working on this in future. (Assignee optional) type: bug and removed untriaged labels Jan 8, 2021
@comius comius self-assigned this Jan 18, 2021
@comius comius added the team-Rules-Java Issues for Java rules label Jan 18, 2021
@davido
Copy link
Contributor Author

davido commented Jan 30, 2021

@comius I still see some strange fetching of alien remote JDKs on Bazel@HEAD (d258263).

To reproduce, clone Gerrit Code Review, and clone code-owners plugin into gerrit's plugins directory, then run this bazel query command:

  $ bazel query 'somepath(plugins/code-owners/java/com/google/gerrit/plugins/codeowners/validation:validation, plugins/code-owners/...)'
DEBUG: /home/davido/.cache/bazel/_bazel_davido/27a001f4182820ef315d8d2d4f1edafe/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:59:14: 
Current running Bazel is not a release version and one was not defined explicitly in rbe_autoconfig target. Falling back to '3.1.0'
Loading: 18 packages loaded
    Fetching @remotejdk11_linux_ppc64le; fetching 5s
    Fetching @remotejdk11_win; fetching 5s
    Fetching @remotejdk11_linux_aarch64; fetching 5s
[...]
Current running Bazel is not a release version and one was not defined explicitly in rbe_autoconfig target. Falling back to '3.1.0'
//plugins/code-owners/java/com/google/gerrit/plugins/codeowners/validation:validation
//plugins/code-owners/java/com/google/gerrit/plugins/codeowners/backend:backend
//plugins/code-owners/java/com/google/gerrit/plugins/codeowners/metrics:metrics
Loading: 21 packages loaded

I am on Linux, so that I wouldn't expect alien remote JDKs to be fetched.

Environment:

  $ uname
  Linux wizball 5.10.3-1-default

  $ java -fullversion
  openjdk full version "11.0.9.1+1-suse-1.1-x8664"

@comius
Copy link
Contributor

comius commented Jan 30, 2021

This is expected. Bazel query has to resolve all paths in a select. cquery won’t download foreign OSes. This will improve after incompatible flag is removed, because selects will go away and because query doesn’t traverse toolchain definitions.

@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
@elasti-liranm
Copy link

@comius Which incompatible flag are you referring to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Rules-Java Issues for Java rules type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants