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

Upgrade to Gradle 4.8 and enable JDK 11 in CI #31230

Closed
8 of 10 tasks
jasontedor opened this issue Jun 9, 2018 · 20 comments · Fixed by #31644
Closed
8 of 10 tasks

Upgrade to Gradle 4.8 and enable JDK 11 in CI #31230

jasontedor opened this issue Jun 9, 2018 · 20 comments · Fixed by #31644
Assignees
Labels
:Delivery/Build Build or test infrastructure jdk11 Team:Delivery Meta label for Delivery team v6.5.0 v7.0.0-beta1

Comments

@jasontedor
Copy link
Member

jasontedor commented Jun 9, 2018

With rampdown phase one of JDK 11 approaching, we want to enable JDK 11 in CI. However, Gradle 4.7 is not compatible with JDK 11 (gradle/gradle#4860). The upgrade to Gradle 4.8 is non-trivial due to Gradle reporting dependency conflicts.

Since the non-trivial nature keeps escalating feature/31230_gradle48_jdk11 will track this work.
CI for the branch is at (elastic/infra#5603, elastic/infra#5601): https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+31230_gradle48_jdk11+matrix-java-feature-branch/

TODO:

These changes should be done for 6.x and master.
Note: Gradle doesn't fully support JDK 11 as of 4.8 and full support is planned for 4.9 gradle/gradle#5120 .

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@jasontedor
Copy link
Member Author

Relates gradle/gradle#5692

@alpar-t
Copy link
Contributor

alpar-t commented Jun 12, 2018

Relates gradle/gradle#5696

@alpar-t
Copy link
Contributor

alpar-t commented Jun 12, 2018

After working around the Gradle issues, there are still problems when running the tests java.lang.NoClassDefFoundError: org.elasticsearch.test.ESTestCase even trough the build log shows that :test:framework was built before attempting to run the tests. Does not reproduce with :server:test in isolation.

JDK 11, or more precisely javadoc, seems to bring it's own baggage. It detects many javadoc issues like invalid {@link no description for @param something and @throws as well as trips over bcprov-jdk15on-1.55.jar; invalid manifest format.

@nik9000
Copy link
Member

nik9000 commented Jun 12, 2018

After working around the Gradle issues, there are still problems when running the tests java.lang.NoClassDefFoundError: org.elasticsearch.test.ESTestCase even trough the build log shows that :test:framework was built before attempting to run the tests. Does not reproduce with :server:test in isolation.

Fun!

JDK 11, or more precisely javadoc, seems to bring it's own baggage. It detects many javadoc issues like invalid {@link no description for @param something and @throws as well as trips over bcprov-jdk15on-1.55.jar; invalid manifest format.

These seem like things we could fix up before merging this PR.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 13, 2018

I will push a fix for the tests. For JDK 11 I have those fixed as well, but was planing a separate PR.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 13, 2018

org.elasticsearch.ingest.attachment.TikaImpl in the ingest-attachemnt plugin has an assert for java version < 11 due to a bug in the JDK. I'm updating it to add the required permission only if running on <= 10, then we can remove this logic when we only support 11. This is a note so we don't forget about it, not sure what the best place to note this is, perhaps an issue to move to java 11.

One Tika test is failing. According to @dadoonet the behavior of Tika changes depending on the JVM being used. Muted the test and submitted #31305

@alpar-t
Copy link
Contributor

alpar-t commented Jun 13, 2018

Getting several of these in various ITs when using JDK 11:

FAILURE 0.15s J0 | CorruptedFileIT.testCorruptFileThenSnapshotAndRestore <<< FAILURES!
   > Throwable #1: java.lang.AssertionError: failed to delete a dummy doc [test][bogus_doc_a3] expected:<DELETED> but was:<NOT_FOUND>
   > 	at __randomizedtesting.SeedInfo.seed([CD6E5B687831964F:BAE1E9EA2DDC2C]:0)
   > 	at org.elasticsearch.test.ESIntegTestCase.indexRandom(ESIntegTestCase.java:1540)
   > 	at org.elasticsearch.test.ESIntegTestCase.indexRandom(ESIntegTestCase.java:1454)
   > 	at org.elasticsearch.test.ESIntegTestCase.indexRandom(ESIntegTestCase.java:1438)
   > 	at org.elasticsearch.test.ESIntegTestCase.indexRandom(ESIntegTestCase.java:1417)
   > 	at org.elasticsearch.index.store.CorruptedFileIT.testCorruptFileThenSnapshotAndRestore(CorruptedFileIT.java:487)
   > 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   > 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   > 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   > 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   > 	at java.base/java.lang.Thread.run(Thread.java:832)

@s1monw
Copy link
Contributor

s1monw commented Jun 13, 2018

The linked issue seems to be a different problem, no?

@alpar-t
Copy link
Contributor

alpar-t commented Jun 14, 2018

@s1monw indeed, thanks for noticing. I edited the comments to have the link in the right place. There's no issue for expected:<DELETED> but was:<NOT_FOUND> yet.

@s1monw
Copy link
Contributor

s1monw commented Jun 14, 2018

@atorok I am very curious what could cause this. Do you have more information or only this error? I am not sure when I will have time to dig into it but I will eventually.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 14, 2018

@s1monw I was planing to look at it more Today, there's much I still need to understand about that what that test does, my first taught is to investigate around the lines of index.gc_deletes and to make sure that creating the document in the first place doesn't silently fail.
To reproduce it, you'll need to set JAVA_HOME to an early access JDK 11, on this branch and just ./gradlew :server:test if you're extremely lucky it might pass, so just run it again. Depending on where it fails, the log can be quite verbose, I have a reproduction with shorter logs hat might make it easier.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 14, 2018

1> [2018-06-14T05:53:31,665][INFO ][o.e.s.a.b.DateHistogramIT] Index [7] docs async: [true] bulk: [false]
  1> [2018-06-14T05:53:31,668][INFO ][o.e.c.m.MetaDataDeleteIndexService] [node_sm0] [idx2/cZllQ12TR2eEUB-MMmUQLg] deleting index

It seems to fail only with async. The test randomizes that.
That could mean a race condition between when we try to delete and when it's actually created.
Edit: tested with a code change that only indexes sync, and multiple runs did not reproduce, so it does seem this has to do with async.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 19, 2018

The problem with expected:<DELETED> but was:<NOT_FOUND> stopped reproducing while I was debugging it without any changes, and I was no longer able to reproduce it. In retrospect I think it was because I was running other builds in parallel before I specifically wanted to reproduce this, so it's possible that the congested CPU caused ES to run slow so the async indexing did not create document by the time we tried to remove them.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 22, 2018

Builds are finally passing on JDK 10 with Gradle 4.8.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 22, 2018

JDK 11 builds are also passing in CI except for when the runtime java is set to 11

@alpar-t
Copy link
Contributor

alpar-t commented Jun 22, 2018

@s1monw
Copy link
Contributor

s1monw commented Jun 25, 2018

The problem with expected: but was:<NOT_FOUND> stopped reproducing while I was debugging it without any changes, and I was no longer able to reproduce it. In retrospect I think it was because I was running other builds in parallel before I specifically wanted to reproduce this, so it's possible that the congested CPU caused ES to run slow so the async indexing did not create document by the time we tried to remove them.

++ thanks for clarifying

@mrhoric
Copy link

mrhoric commented Jul 15, 2018

macos 10.13.6
jdk 1.8.0
gradle 4.7

I can't build es-5.6, it report errors like follows, how can i do some thing:

[2018-07-15T17:27:30,164][INFO ][o.e.p.PluginsService     ] [B9bR86I] loaded module [reindex]
[2018-07-15T17:27:30,164][INFO ][o.e.p.PluginsService     ] [B9bR86I] loaded module [transport-netty3]
[2018-07-15T17:27:30,164][INFO ][o.e.p.PluginsService     ] [B9bR86I] loaded module [transport-netty4]
[2018-07-15T17:27:30,166][INFO ][o.e.p.PluginsService     ] [B9bR86I] no plugins loaded
[2018-07-15T17:27:34,962][INFO ][o.e.d.DiscoveryModule    ] [B9bR86I] using discovery type [zen]
[2018-07-15T17:27:38,029][INFO ][o.e.n.Node               ] initialized
[2018-07-15T17:27:38,029][INFO ][o.e.n.Node               ] [B9bR86I] starting ...
[2018-07-15T17:27:38,757][INFO ][o.e.t.TransportService   ] [B9bR86I] publish_address {127.0.0.1:57986}, bound_addresses {[::1]:57985}, {127.0.0.1:57986}
[2018-07-15T17:27:41,920][INFO ][o.e.c.s.ClusterService   ] [B9bR86I] new_master {B9bR86I}{B9bR86IETgCsp4W0ZtL8CA}{WHLTSbYvTXi5hbOE_SEN2g}{127.0.0.1}{127.0.0.1:57986}{testattr=test}, reason: zen-disco-elected-as-master ([0] nodes joined)[, ]
[2018-07-15T17:27:41,969][INFO ][o.e.h.n.Netty4HttpServerTransport] [B9bR86I] publish_address {127.0.0.1:58002}, bound_addresses {[::1]:58001}, {127.0.0.1:58002}
[2018-07-15T17:27:41,974][INFO ][o.e.n.Node               ] [B9bR86I] started
[2018-07-15T17:27:41,982][INFO ][o.e.g.GatewayService     ] [B9bR86I] recovered [0] indices into cluster_state
=========================================

> Task :modules:reindex:integTestRunner FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':modules:reindex:integTestRunner'.
> There were test failures: 3 suites (1 ignored), 122 tests, 1 error [seed: 28E3711AC3679E5]

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':modules:reindex:integTestRunner'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:596)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: : There were test failures: 3 suites (1 ignored), 122 tests, 1 error [seed: 28E3711AC3679E5]
        at com.carrotsearch.ant.tasks.junit4.JUnit4.execute(JUnit4.java:1051)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78)
        at com.carrotsearch.gradle.junit4.RandomizedTestingTask.executeTests(RandomizedTestingTask.groovy:237)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:794)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:761)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
        ... 29 more


Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 49m 55s
683 actionable tasks: 240 executed, 443 up-to-date

@jasontedor
Copy link
Member Author

@mrhoric Please use the forum instead of posting on closed and unrelated issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure jdk11 Team:Delivery Meta label for Delivery team v6.5.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants