From 3051b98b9e1d85ddee03a3b1e4afbc525c307a1a Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Wed, 8 Dec 2021 10:53:12 +0100 Subject: [PATCH 1/8] remove disabled tests on JDK 15,16 --- .../co/elastic/apm/agent/impl/metadata/ContainerInfoTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/ContainerInfoTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/ContainerInfoTest.java index 94c5653028..d779e2cbd6 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/ContainerInfoTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/ContainerInfoTest.java @@ -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; @@ -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"; From e32064222256f02745a0bd08f2cb236e3a8d6c7d Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Wed, 8 Dec 2021 15:14:10 +0100 Subject: [PATCH 2/8] update documentation --- docs/supported-technologies.asciidoc | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/supported-technologies.asciidoc b/docs/supported-technologies.asciidoc index 9cd9ad8bd4..ca66da226b 100644 --- a/docs/supported-technologies.asciidoc +++ b/docs/supported-technologies.asciidoc @@ -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+, 11, 17 |`--module-path` has not been tested yet -|Open JDK -|7u60+, 8u40+, 9, 10, 11 +|OpenJDK +|7u60+, 8u40+, 11, 17 |`--module-path` has not been tested yet |IBM J9 VM @@ -64,7 +64,25 @@ the agent does not capture transactions. | |=== -NOTE: Early Java 8 versions before update 40 are *not supported* because they have +==== Oracle & OpenJDK LTS + +For Oracle and OpenJDK, we provide *first-class* support for Long Term Support (LTS) releases as defined in https://www.oracle.com/java/technologies/java-se-support-roadmap.html[Oracle Java Support Roadmap] + +- LTS releases are supported __at least__ until they reach End-Of-Life status defined by the __End of Premier support__. +- Non-LTS releases are supported __at least__ until they reach End-Of-Life. + +For Non-LTS releases, we provide a *best-effort* support: + +- Most Java versions work without any reported issue : 9, 10, 12, 13, 14 and 16 +- Few Java versions might have known issues: only 15 so far +- They aren't as thoroughly and continuously tested for regressions + +The usual advice regarding which Java version to use still applies here: using a non-LTS or a version that reached +End of Life is not recommended, especially in production. + +==== 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. From fd5680956c372cd4e316425b02a9d465e310b52d Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Wed, 8 Dec 2021 15:22:14 +0100 Subject: [PATCH 3/8] remove jdk 12,13,14 from jdk tests --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4b167b5c52..e665b85709 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -333,7 +333,7 @@ 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' + values 'openjdk17', 'openjdk18' } } From 729ab199e43d48b45a9e2829c3d2c6f42c581ec4 Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Wed, 8 Dec 2021 15:51:27 +0100 Subject: [PATCH 4/8] disable jedis1 test known to fail on jdk15 --- .../co/elastic/apm/agent/jedis/Jedis1InstrumentationIT.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/src/test/java/co/elastic/apm/agent/jedis/Jedis1InstrumentationIT.java b/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/src/test/java/co/elastic/apm/agent/jedis/Jedis1InstrumentationIT.java index 53f22ace4d..14c7b03f3e 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/src/test/java/co/elastic/apm/agent/jedis/Jedis1InstrumentationIT.java +++ b/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/src/test/java/co/elastic/apm/agent/jedis/Jedis1InstrumentationIT.java @@ -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; @@ -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()); From afec1e0087f0cc10d81e48ee7737cb455da0fe0a Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Wed, 8 Dec 2021 15:51:46 +0100 Subject: [PATCH 5/8] avoid using level 3 headers --- docs/supported-technologies.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/supported-technologies.asciidoc b/docs/supported-technologies.asciidoc index ca66da226b..d59eeb2197 100644 --- a/docs/supported-technologies.asciidoc +++ b/docs/supported-technologies.asciidoc @@ -64,7 +64,7 @@ the agent does not capture transactions. | |=== -==== Oracle & OpenJDK LTS +**Oracle & OpenJDK LTS** For Oracle and OpenJDK, we provide *first-class* support for Long Term Support (LTS) releases as defined in https://www.oracle.com/java/technologies/java-se-support-roadmap.html[Oracle Java Support Roadmap] @@ -80,7 +80,7 @@ For Non-LTS releases, we provide a *best-effort* support: The usual advice regarding which Java version to use still applies here: using a non-LTS or a version that reached End of Life is not recommended, especially in production. -==== Early Java 8 and Java 7 +**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, From 3175d6a6c42ec6250a7d86735adcc4299f0d79bf Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Wed, 8 Dec 2021 16:50:29 +0100 Subject: [PATCH 6/8] disable openjdk 18 test for now --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e665b85709..da90daf5fe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -333,7 +333,7 @@ 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 'openjdk17', 'openjdk18' + values 'openjdk17', // 'openjdk18' // disabled for now see https://github.com/elastic/apm-agent-java/issues/2328 } } From 1b5e8e96c2efec878d3bb79b4d3bc73226d442e2 Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Wed, 8 Dec 2021 17:03:20 +0100 Subject: [PATCH 7/8] fix pipeline typo --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index da90daf5fe..0026e8a847 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -333,7 +333,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 'openjdk17', // 'openjdk18' // disabled for now see https://github.com/elastic/apm-agent-java/issues/2328 + // 'openjdk18' disabled for now see https://github.com/elastic/apm-agent-java/issues/2328 + values 'openjdk17' } } From 2d37d45c0e60da62802ae2f4028c6b8c3b2d967e Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Mon, 10 Jan 2022 13:25:43 +0100 Subject: [PATCH 8/8] simplify jdk17 compat change to minimal --- docs/supported-technologies.asciidoc | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/supported-technologies.asciidoc b/docs/supported-technologies.asciidoc index d59eeb2197..6f6ceccd6e 100644 --- a/docs/supported-technologies.asciidoc +++ b/docs/supported-technologies.asciidoc @@ -44,11 +44,11 @@ the agent does not capture transactions. |Vendor |Supported versions |Notes |Oracle JDK -|7u60+, 8u40+, 11, 17 +|7u60+, 8u40+, 9, 10, 11, 17 |`--module-path` has not been tested yet |OpenJDK -|7u60+, 8u40+, 11, 17 +|7u60+, 8u40+, 9, 10, 11, 17 |`--module-path` has not been tested yet |IBM J9 VM @@ -64,22 +64,6 @@ the agent does not capture transactions. | |=== -**Oracle & OpenJDK LTS** - -For Oracle and OpenJDK, we provide *first-class* support for Long Term Support (LTS) releases as defined in https://www.oracle.com/java/technologies/java-se-support-roadmap.html[Oracle Java Support Roadmap] - -- LTS releases are supported __at least__ until they reach End-Of-Life status defined by the __End of Premier support__. -- Non-LTS releases are supported __at least__ until they reach End-Of-Life. - -For Non-LTS releases, we provide a *best-effort* support: - -- Most Java versions work without any reported issue : 9, 10, 12, 13, 14 and 16 -- Few Java versions might have known issues: only 15 so far -- They aren't as thoroughly and continuously tested for regressions - -The usual advice regarding which Java version to use still applies here: using a non-LTS or a version that reached -End of Life is not recommended, especially in production. - **Early Java 8 and Java 7** Early Java 8 versions before update 40 are *not supported* because they have