Skip to content

Commit

Permalink
JDK 17 Official support (#2327)
Browse files Browse the repository at this point in the history
* remove disabled tests on JDK 15,16

* update documentation

* remove jdk 12,13,14 from jdk tests

* disable jedis1 test known to fail on jdk15

* avoid using level 3 headers

* disable openjdk 18 test for now

* fix pipeline typo

* simplify jdk17 compat change to minimal
  • Loading branch information
SylvainJuge authored Jan 10, 2022
1 parent ce271a8 commit b679c87
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ pipeline {
axis {
// the list of support java versions can be found in the infra repo (ansible/roles/java/defaults/main.yml)
name 'JAVA_VERSION'
values 'openjdk12', 'openjdk13', 'openjdk14', 'openjdk17'
// 'openjdk18' disabled for now see https://github.com/elastic/apm-agent-java/issues/2328
values 'openjdk17'

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import co.elastic.apm.agent.util.CustomEnvVariables;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;

import javax.annotation.Nullable;

Expand Down Expand Up @@ -131,7 +129,6 @@ void testKubernetesInfo_containerd_cri() {
}

@Test
@DisabledOnJre({JRE.JAVA_15, JRE.JAVA_16}) // https://github.com/elastic/apm-agent-java/issues/1942
void testKubernetesDownwardApi() throws Exception {
String line = "1:name=systemd:/kubepods/besteffort/pode9b90526-f47d-11e8-b2a5-080027b9f4fb/15aa6e53-b09a-40c7-8558-c6c31e36c88a";
String containerId = "15aa6e53-b09a-40c7-8558-c6c31e36c88a";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import redis.clients.jedis.Jedis;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -48,6 +50,7 @@ void tearDownJedis() {
}

@Test
@DisabledOnJre(JRE.JAVA_15) // https://github.com/elastic/apm-agent-java/issues/1944
void testJedis() {
jedis.set("foo", "bar");
assertThat(jedis.get("foo".getBytes())).isEqualTo("bar".getBytes());
Expand Down
12 changes: 7 additions & 5 deletions docs/supported-technologies.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ the agent does not capture transactions.
=== Java versions

|===
|Vendor |Supported versions | Notes
|Vendor |Supported versions |Notes

|Oracle JDK
|7u60+, 8u40+, 9, 10, 11
|7u60+, 8u40+, 9, 10, 11, 17
|`--module-path` has not been tested yet

|Open JDK
|7u60+, 8u40+, 9, 10, 11
|OpenJDK
|7u60+, 8u40+, 9, 10, 11, 17
|`--module-path` has not been tested yet

|IBM J9 VM
Expand All @@ -64,7 +64,9 @@ the agent does not capture transactions.
|
|===

NOTE: Early Java 8 versions before update 40 are *not supported* because they have
**Early Java 8 and Java 7**

Early Java 8 versions before update 40 are *not supported* because they have
several bugs that might result in JVM crashes when a java agent is active,
thus agent *will not start* on those versions.
Similarly, Java 7 versions before update 60 are not supported as they are buggy in regard to invokedynamic.
Expand Down

0 comments on commit b679c87

Please sign in to comment.