Skip to content

Commit b679c87

Browse files
authored
JDK 17 Official support (elastic#2327)
* 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
1 parent ce271a8 commit b679c87

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ pipeline {
335335
axis {
336336
// the list of support java versions can be found in the infra repo (ansible/roles/java/defaults/main.yml)
337337
name 'JAVA_VERSION'
338-
values 'openjdk12', 'openjdk13', 'openjdk14', 'openjdk17'
338+
// 'openjdk18' disabled for now see https://github.com/elastic/apm-agent-java/issues/2328
339+
values 'openjdk17'
339340

340341
}
341342
}

apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/ContainerInfoTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
import co.elastic.apm.agent.util.CustomEnvVariables;
2222
import org.junit.jupiter.api.Test;
23-
import org.junit.jupiter.api.condition.DisabledOnJre;
24-
import org.junit.jupiter.api.condition.JRE;
2523

2624
import javax.annotation.Nullable;
2725

@@ -131,7 +129,6 @@ void testKubernetesInfo_containerd_cri() {
131129
}
132130

133131
@Test
134-
@DisabledOnJre({JRE.JAVA_15, JRE.JAVA_16}) // https://github.com/elastic/apm-agent-java/issues/1942
135132
void testKubernetesDownwardApi() throws Exception {
136133
String line = "1:name=systemd:/kubepods/besteffort/pode9b90526-f47d-11e8-b2a5-080027b9f4fb/15aa6e53-b09a-40c7-8558-c6c31e36c88a";
137134
String containerId = "15aa6e53-b09a-40c7-8558-c6c31e36c88a";

apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/src/test/java/co/elastic/apm/agent/jedis/Jedis1InstrumentationIT.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import org.junit.jupiter.api.AfterEach;
2323
import org.junit.jupiter.api.BeforeEach;
2424
import org.junit.jupiter.api.Test;
25+
import org.junit.jupiter.api.condition.DisabledOnJre;
26+
import org.junit.jupiter.api.condition.JRE;
2527
import redis.clients.jedis.Jedis;
2628

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

5052
@Test
53+
@DisabledOnJre(JRE.JAVA_15) // https://github.com/elastic/apm-agent-java/issues/1944
5154
void testJedis() {
5255
jedis.set("foo", "bar");
5356
assertThat(jedis.get("foo".getBytes())).isEqualTo("bar".getBytes());

docs/supported-technologies.asciidoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ the agent does not capture transactions.
4141
=== Java versions
4242

4343
|===
44-
|Vendor |Supported versions | Notes
44+
|Vendor |Supported versions |Notes
4545

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

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

5454
|IBM J9 VM
@@ -64,7 +64,9 @@ the agent does not capture transactions.
6464
|
6565
|===
6666

67-
NOTE: Early Java 8 versions before update 40 are *not supported* because they have
67+
**Early Java 8 and Java 7**
68+
69+
Early Java 8 versions before update 40 are *not supported* because they have
6870
several bugs that might result in JVM crashes when a java agent is active,
6971
thus agent *will not start* on those versions.
7072
Similarly, Java 7 versions before update 60 are not supported as they are buggy in regard to invokedynamic.

0 commit comments

Comments
 (0)