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

Set up CI job for Gerrit on Java 9 #173

Closed
davido opened this issue Jan 24, 2018 · 10 comments
Closed

Set up CI job for Gerrit on Java 9 #173

davido opened this issue Jan 24, 2018 · 10 comments

Comments

@davido
Copy link
Contributor

davido commented Jan 24, 2018

//CC @cushon, @jart.

Bazel@HEAD and upcoming 0.10.0 release should support Java 9 out of the box. Gerrit@HEAD supports Java 9, well, almost, the only missing dependency is this rules_closure PR: [1].

Please add a job to Bazel CI to verify Gerrit on Java 9.

[1] bazelbuild/rules_closure#235

@davido davido changed the title Set up CI for Gerrit on Java 9 Set up CI job for Gerrit on Java 9 Jan 24, 2018
@philwo
Copy link
Member

philwo commented Feb 8, 2018

We'll look into this! Thanks.

@davido
Copy link
Contributor Author

davido commented Feb 8, 2018

@philwo Thanks. It worth mention, though, that the last needed change is still pending for review: [1]. Also, only upcoming Bazel version, 0.11.0 supports Java 9 out of the box. Once it's merged, the command to build gerrit with Java 9 would be:

  $ bazel --host_javabase=/usr/lib64/jvm/java-9-openjdk test \
      --javacopt='--release 9' \
      --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 //...

@davido
Copy link
Contributor Author

davido commented Aug 15, 2018

@philwo

In light of this thread: [1] and given that building Gerrit Code Review on JDK9 ist broken (bazelbuild/bazel#5896) on most recent Bazel master and even in 17.0rc1, and that this breakage wasn't discovered yet, any progress here?

All is needed is to set up JDK9 on CI host, and set up CI build on Gerrit master and activate JDK9:

$ bazel test \
  --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java9 \
  --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 \
   //...

[1] https://groups.google.com/d/topic/bazel-discuss/1116GHzkNm0/discussion

@philwo
Copy link
Member

philwo commented Aug 15, 2018

@davido Thanks for the clear explanation.

I'm OOO next week and we have to do some work on CI and Bazel before we can get this done, so it'll be ~2-3 weeks before I can get to this.

@davido
Copy link
Contributor Author

davido commented Aug 15, 2018

@philwo Thanks for the update.

@philwo
Copy link
Member

philwo commented Sep 6, 2018

Update: We now have Ubuntu 18.04 LTS machines with system JDK being OpenJDK 9 and 10.

You can test on these machines by using the "ubuntu1804_java9" and "ubuntu1804_java10" platform in presubmit.yml / postsubmit.yml.

@davido
Copy link
Contributor Author

davido commented Sep 6, 2018

You can test on these machines by using the "ubuntu1804_java9" and "ubuntu1804_java10" platform in presubmit.yml / postsubmit.yml.

Sorry, It doesn't tell me anything. I'm not familiar with buildkite.com.

@philwo
Copy link
Member

philwo commented Sep 6, 2018

No problem and sorry for not explaining better. Basically, we have a config file for Gerrit here: https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/pipelines/gerrit-postsubmit.yml

We can add an entry that tests however you'd like to test Gerrit with Java 9. With @lberki rolling changes back and forth, I'm not sure if the --host_java_toolchain / --java_toolchain flags still apply as you mentioned above, but otherwise this is how it would look like: #322

@davido
Copy link
Contributor Author

davido commented Sep 7, 2018

@philwo Thanks. That's clear now. I think that @lberki is rolling back JDK10 embedded JDK and javac support on Bazel@HEAD, but the JDK9 should still work and supported in Gerrit@HEAD.

Thanks a lot for moving Bazel CI forward and supporting newer Java versions. That will assure that future breakages can be detected and track down earlier. Great job!

@philwo
Copy link
Member

philwo commented May 28, 2019

Fixed in the meantime.

@philwo philwo closed this as completed May 28, 2019
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