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

Bump the minimum Java version to Java 11 #40754

Merged
merged 17 commits into from Apr 7, 2019

Conversation

Projects
None yet
6 participants
@jasontedor
Copy link
Member

commented Apr 2, 2019

With the 8.0.0 release of Elasticsearch we will bump the minimum required Java to Java 11. This commit puts this into effect on the master branch.

jasontedor added some commits Apr 2, 2019

Bump the minimum Java version to Java 11
With the 8.0.0 release of Elasticsearch we will bump the minimum
required Java to Java 11. This commit puts this into effect on the
master branch.
@elasticmachine

This comment has been minimized.

Copy link

commented Apr 2, 2019

@jasontedor

This comment has been minimized.

Copy link
Member Author

commented Apr 2, 2019

@jkakavas FYI this means that we will need a java11fips JVM in CI to continue supporting FIPS.

spalger added a commit to spalger/kibana that referenced this pull request Apr 2, 2019

jasontedor added some commits Apr 2, 2019

@jasontedor

This comment has been minimized.

Copy link
Member Author

commented Apr 3, 2019

@danielmitterdorfer This will disrupt performance benchmarks, how do you want to proceed?

@jpountz

jpountz approved these changes Apr 3, 2019

Copy link
Contributor

left a comment

What I understand looks good, but please wait for @rjernst's review before pushing as I'm not very familiar with the build.

It looks like we could do minor simplifications in BuildPlugin.groovy and PrecommitTasks.groovy, which check for project.runtimeJavaVersion >= JavaVersion.VERSION_1_9, which would always be true now, and project.compilerJavaVersion < JavaVersion.VERSION_1_10 which would always evaluate to false?

//tag::notable-breaking-changes[]
==== Java 11 is required

Java 11 is now required to run Elasticsearch and any of its command line tools.

This comment has been minimized.

Copy link
@jpountz

jpountz Apr 3, 2019

Contributor

do we need to say "11 or greater" to clarify that more recent versions are fine?

@@ -34,39 +34,39 @@ publishing {

archivesBaseName = 'elasticsearch'

// we want to keep the JDKs in our IDEs set to JDK 8 until minimum JDK is bumped to 9 so we do not include this source set in our IDEs
// we want to keep the JDKs in our IDEs set to JDK 11 until minimum JDK is bumped to 17 so we do not include this source set in our IDEs

This comment has been minimized.

Copy link
@jpountz

jpountz Apr 3, 2019

Contributor

s/17/12/ ?

This comment has been minimized.

Copy link
@rjernst

rjernst Apr 4, 2019

Member

I think it should be 18? The next LTS release?

This comment has been minimized.

Copy link
@jasontedor

jasontedor Apr 6, 2019

Author Member

Yeah, I was going for the next LTS release which I had in my head was 17. I think that's right though? JDK LTS releases every three years, 11 was in September 2018 so the next one would be September 2021 which would be:

  • 13 September 2019
  • 14 March 2020
  • 15 September 2020
  • 16 March 2021
  • 17 September 2021
configuredMaxHeapSize, mem, inputArguments, bootClassPath, classPath, systemProperties, gcCollectors, memoryPools, onError,
onOutOfMemoryError, useCompressedOops, useG1GC, useSerialGC);
INSTANCE = new JvmInfo(
ProcessHandle.current().pid(),

This comment has been minimized.

Copy link
@jpountz

jpountz Apr 3, 2019

Contributor

note to other reviewers: this line is the thing that changed

danielmitterdorfer added a commit to danielmitterdorfer/rally-teams that referenced this pull request Apr 3, 2019

Bump minimum Java version to Java 11
Elasticsearch master bumps the minimum Java version to Java 11. With
this commit we follow suit.

Relates elastic/elasticsearch#40754

danielmitterdorfer added a commit to elastic/rally-teams that referenced this pull request Apr 3, 2019

Bump minimum Java version to Java 11
Elasticsearch master bumps the minimum Java version to Java 11. With
this commit we follow suit.

Relates elastic/elasticsearch#40754
Relates #25
@danielmitterdorfer

This comment has been minimized.

Copy link
Member

commented Apr 3, 2019

@danielmitterdorfer This will disrupt performance benchmarks, how do you want to proceed?

Thanks for the ping; highly appreciated. We're all set from a benchmarking perspective and the cutover benchmarking run has just been triggered. From now on all our nightly benchmarks will run with OpenJDK 11.0.2.

@atorok
Copy link
Contributor

left a comment

Thanks! I left some comments and questions.
Note to self, there's some cleanup in buildSrc/build.gradle that is made possible by this PR.

@@ -6,11 +6,8 @@
# or 'openjdk' followed by the major release number.

ES_RUNTIME_JAVA:
- java8
- java8fips

This comment has been minimized.

Copy link
@atorok

atorok Apr 3, 2019

Contributor

Shouldn't we have an alternative before removing this?
There's #37250 so this will not fall trough the cracks, but in the interim we will have no fips testing,
and fips might have to play catch-up once we get the tests back.
I think that's something we should generally try to avoid in CI.

This comment has been minimized.

Copy link
@jasontedor

jasontedor Apr 6, 2019

Author Member

I discussed this with @jkakavas and he will be working on getting a FIPS-compliant JDK 11 ready, but agreed that can happen independently. He will focus on that in the upcoming week.

@@ -246,6 +246,10 @@ def linux_common(config,
touch /is_vagrant_vm # for consistency between linux and windows
SHELL

config.vm.provision 'jdk-11', type: 'shell', inline: <<-SHELL
curl -sSL https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz | tar xz -C /opt/

This comment has been minimized.

Copy link
@atorok

atorok Apr 3, 2019

Contributor

This can potentially lead to more CI failures due to network issues.
On the other hand I'm not sure we need to pull in any JDK for the packaging tests,
AFAIK we test with the java version from the platform under test, if this is to old we should just stick to the bundled one or have the set set JAVA_HOME to that location of that's what we want to test.

This comment has been minimized.

Copy link
@jasontedor

jasontedor Apr 6, 2019

Author Member

We need a non-bundled JDK in the image that can run Elasticsearch to test that a non-bundled JDK works. The installed JDK 8s would be too old, so we need JDK 11.

@@ -34,39 +34,39 @@ publishing {

archivesBaseName = 'elasticsearch'

// we want to keep the JDKs in our IDEs set to JDK 8 until minimum JDK is bumped to 9 so we do not include this source set in our IDEs
// we want to keep the JDKs in our IDEs set to JDK 11 until minimum JDK is bumped to 17 so we do not include this source set in our IDEs

This comment has been minimized.

Copy link
@atorok

atorok Apr 3, 2019

Contributor

Why aren't we removing the additional source set just like we did for libs ?
Are we anticipating a need to to MR jars for java 12 ?

This comment has been minimized.

Copy link
@jasontedor

jasontedor Apr 6, 2019

Author Member

Yeah, I'm anticipating that indeed.

@rjernst

rjernst approved these changes Apr 4, 2019

Copy link
Member

left a comment

LGTM

Vagrantfile Outdated
fi
export SYSTEM_JAVA_HOME=\\\$JAVA_HOME
unset JAVA_HOME
export PATH=/opt/jdk-11.0.2/bin:\\\$PATH

This comment has been minimized.

Copy link
@rjernst

rjernst Apr 4, 2019

Member

Why is this added to path? The packaging tests don't use java on path anymore.

This comment has been minimized.

Copy link
@jasontedor

jasontedor Apr 6, 2019

Author Member

We do use Java on the path. We have lines like:

local java=$(which java)

I'll rework these tests so that they aren't using Java from the path.

This comment has been minimized.

Copy link
@jasontedor
@@ -34,39 +34,39 @@ publishing {

archivesBaseName = 'elasticsearch'

// we want to keep the JDKs in our IDEs set to JDK 8 until minimum JDK is bumped to 9 so we do not include this source set in our IDEs
// we want to keep the JDKs in our IDEs set to JDK 11 until minimum JDK is bumped to 17 so we do not include this source set in our IDEs

This comment has been minimized.

Copy link
@rjernst

rjernst Apr 4, 2019

Member

I think it should be 18? The next LTS release?

jasontedor added some commits Apr 6, 2019

Merge branch 'master' into minimum-java-11
* master: (77 commits)
  Suppress lease background sync failures if stopping (#40902)
  [DOCS] Added settings page for ILM. (#40880)
  [Docs] Remove extraneous text (#40914)
  Move test classes to test root in Painless (#40873)
  Fix date index name processor default date_formats (#40915)
  Source additional files correctly in elasticsearch-cli (#40890)
  Allow AVX-512 on JDK 11+ (#40828)
  [Docs] Change example to show col headers (#40822)
  Update apache httpclient to version 4.5.8 (#40875)
  Update monitoring-kibana.json (#40899)
  Introduce Delegating ActionListener Wrappers (#40129)
  Deprecate old transport settings (#40821)
  Add Kibana application privileges for monitoring and ml reserved roles (#40651)
  Use Writeable for TransportReplAction derivatives (#40894)
  Add test for HTTP and Transport TLS on basic license (#40714)
  Remove unneded cluster config from test (#40856)
  Make Fuzziness reject illegal values earlier (#33511)
  Remove test-only customisation from TransReplAct (#40863)
  Fix dense/sparse vector limit documentation (#40852)
  Make -try xlint warning disabled by default. (#40833)
  ...
@jasontedor

This comment has been minimized.

Copy link
Member Author

commented Apr 6, 2019

@elasticmachine run elasticsearch-ci/2

jasontedor added some commits Apr 6, 2019

jasontedor added some commits Apr 7, 2019

Merge remote-tracking branch 'elastic/master' into minimum-java-11
* elastic/master:
  Fix Failing to Handle Ex. in TransportShardBulkAction (#40923)
  Be lenient when parsing build flavor and type on the wire (#40734)
  Make Transport Shard Bulk Action Async (#39793)
Merge remote-tracking branch 'elastic/master' into minimum-java-11
* elastic/master:
  Mute failing IndexShard local history test

@jasontedor jasontedor merged commit 8deadfb into elastic:master Apr 7, 2019

9 checks passed

CLA All commits in pull request signed
Details
elasticsearch-ci/1 Build finished.
Details
elasticsearch-ci/2 Build finished.
Details
elasticsearch-ci/bwc Build finished.
Details
elasticsearch-ci/default-distro Build finished.
Details
elasticsearch-ci/docbldesx Build finished.
Details
elasticsearch-ci/docs-check Build finished.
Details
elasticsearch-ci/oss-distro-docs Build finished.
Details
elasticsearch-ci/packaging-sample Build finished.
Details

@jasontedor jasontedor deleted the jasontedor:minimum-java-11 branch Apr 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.