Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Dec 22, 2024
1 parent 1ac3dee commit 8dd4557
Show file tree
Hide file tree
Showing 64 changed files with 337 additions and 380 deletions.
21 changes: 21 additions & 0 deletions .github/scripts/check-latest-dep-test-overrides.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -e

# all missing version coverage should be documented in supported-libraries.md

if grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
| grep -v :+\" \
| grep -v "// see .* module" \
| grep -v "// see test suite below" \
| grep -v "// no longer applicable" \
| grep -v "// related dependency" \
| grep -v "// native on-by-default instrumentation after this version" \
| grep -v "// documented limitation" \
| grep -v "instrumentation/jaxrs-client/jaxrs-client-2.0-testing/build.gradle.kts"; then

echo
echo "Found an undocumented latestDepTestLibrary (see above)."
echo
echo "See .gith/scripts/check-latest-dep-test-overrides.sh in this repository"
echo "and add one of the required comments."
exit 1
fi

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/build-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ jobs:
exit 1
fi
check-latest-dep-test-overrides:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- run: .github/scripts/check-latest-dep-test-overrides.sh

build:
runs-on: ubuntu-latest
steps:
Expand Down
23 changes: 12 additions & 11 deletions docs/supported-libraries.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions instrumentation/apache-shenyu-2.4/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ muzzle {
}

dependencies {
compileOnly("org.apache.shenyu:shenyu-web:2.4.0")
library("org.apache.shenyu:shenyu-web:2.4.0")
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")

Expand All @@ -27,7 +27,7 @@ dependencies {
}

// the latest version of apache shenyu uses spring-boot 2.7
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.7.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.7.+") // related dependency

testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies {
testImplementation("javax.xml.bind:jaxb-api:2.3.1")

// last version that does not use json protocol
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583")
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583") // documented limitation
}

testing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
testLibrary("com.amazonaws:aws-java-sdk-sqs:1.11.106")

// last version that does not use json protocol
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583")
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583") // documented limitation
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies {
testLibrary("com.amazonaws:aws-java-sdk-sns:1.11.106")

// last version that does not use json protocol
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583")
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583") // documented limitation
}

if (!(findProperty("testLatestDeps") as Boolean)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ dependencies {

testImplementation(project(":instrumentation:couchbase:couchbase-common:testing"))

// later versions are tested with couchbase-2.6 instrumentation
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:2.+")
latestDepTestLibrary("com.couchbase.client:java-client:2.5.+")
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:2.+") // see couchbase-2.6 module
latestDepTestLibrary("com.couchbase.client:java-client:2.5.+") // see couchbase-2.6 module
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ dependencies {
testLibrary("org.springframework.data:spring-data-couchbase:3.1.0.RELEASE")
testLibrary("com.couchbase.client:encryption:1.0.0")

latestDepTestLibrary("org.springframework.data:spring-data-couchbase:3.1.+")
latestDepTestLibrary("com.couchbase.client:java-client:2.+")
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:3.1.+") // see couchbase-3.1 module
latestDepTestLibrary("com.couchbase.client:java-client:2.+") // see couchbase-3.1 module
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
testImplementation("org.testcontainers:elasticsearch")

latestDepTestLibrary("co.elastic.clients:elasticsearch-java:7.17.19")
latestDepTestLibrary("co.elastic.clients:elasticsearch-java:7.17.19") // native on-by-default instrumentation after this version
}

val latestDepTest = findProperty("testLatestDeps") as Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ dependencies {
testLibrary("org.elasticsearch.plugin:transport-netty3-client:5.0.0")
testLibrary("org.elasticsearch.client:transport:5.0.0")

latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.0.0")
latestDepTestLibrary("org.elasticsearch.client:transport:5.0.0")
latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.2.+") // see elasticsearch-transport-5.3 module
latestDepTestLibrary("org.elasticsearch.client:transport:5.2.+") // see elasticsearch-transport-5.3 module
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ static void setUp(@TempDir File esWorkingDir) {
.put("transport.type", "netty3")
.put("http.type", "netty3")
.put(CLUSTER_NAME_SETTING.getKey(), clusterName)
.put("discovery.type", "local")
.build();
testNode =
new Node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ static void setUp(@TempDir File esWorkingDir) {
.put("transport.type", "netty3")
.put("http.type", "netty3")
.put(CLUSTER_NAME_SETTING.getKey(), clusterName)
.put("discovery.type", "local")
.build();
testNode =
new Node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {

latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.+") // see elasticsearch-transport-6.0 module
latestDepTestLibrary("org.elasticsearch.client:transport:5.+") // see elasticsearch-transport-6.0 module
latestDepTestLibrary("org.springframework.data:spring-data-elasticsearch:3.0.+")
latestDepTestLibrary("org.springframework.data:spring-data-elasticsearch:3.0.+") // see elasticsearch-transport-6.0 module
}

tasks {
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/grails-3.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
testLibrary("org.springframework.boot:spring-boot-starter-tomcat:$springBootVersion")

latestDepTestLibrary("org.springframework.boot:spring-boot-autoconfigure:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-autoconfigure:2.+") // related dependency
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+") // related dependency
}

// testing-common pulls in groovy 4 and spock as dependencies, exclude them
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ dependencies {

testImplementation(project(":instrumentation:graphql-java:graphql-java-common:testing"))

latestDepTestLibrary("com.graphql-java:graphql-java:19.+")
latestDepTestLibrary("com.graphql-java:graphql-java:19.+") // see graphql-java-20.0 module
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ dependencies {

testImplementation(project(":instrumentation:graphql-java:graphql-java-common:testing"))

latestDepTestLibrary("com.graphql-java:graphql-java:19.+")
latestDepTestLibrary("com.graphql-java:graphql-java:19.+") // see graphql-java-20.0 module
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ dependencies {
testImplementation("org.springframework.data:spring-data-jpa:3.0.0")

springAgent("org.springframework:spring-instrument:6.0.7")

latestDepTestLibrary("org.hibernate:hibernate-core:6.2.+")
}

otelJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ dependencies {
testInstrumentation(project(":instrumentation:http-url-connection:javaagent"))
testInstrumentation(project(":instrumentation:java-http-client:javaagent"))

// there's no test coverage beyond this, but there's no reason to believe it wouldn't work
// also note that this isn't really documented on supported-libraries.md because there's not
// really any instrumentation for it, as it just relies on other http client instrumentations
latestDepTestLibrary("org.glassfish.jersey.inject:jersey-hk2:2.+")
latestDepTestLibrary("org.glassfish.jersey.core:jersey-client:2.+")
latestDepTestLibrary("org.jboss.resteasy:resteasy-client:3.0.26.Final")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ import org.jboss.resteasy.specimpl.ResteasyUriBuilder
import spock.lang.AutoCleanup
import spock.lang.Shared

import javax.ws.rs.GET
import javax.ws.rs.HeaderParam
import javax.ws.rs.POST
import javax.ws.rs.PUT
import javax.ws.rs.Path
import javax.ws.rs.QueryParam
import javax.ws.rs.*
import javax.ws.rs.core.Response
import java.nio.charset.StandardCharsets

Expand All @@ -25,26 +20,26 @@ class ResteasyProxyClientTest extends HttpClientTest<ResteasyProxyResource> impl
@Shared
@AutoCleanup
def client = new ResteasyClientBuilder()
.connectionPoolSize(4)
.build()
.connectionPoolSize(4)
.build()

@Override
ResteasyProxyResource buildRequest(String method, URI uri, Map<String, String> headers) {
return client
.target(new ResteasyUriBuilder().uri(resolveAddress("")))
.proxy(ResteasyProxyResource)
.target(new ResteasyUriBuilder().uri(resolveAddress("")))
.proxy(ResteasyProxyResource)
}

@Override
int sendRequest(ResteasyProxyResource proxy, String method, URI uri, Map<String, String> headers) {
def proxyMethodName = "${method}_${uri.path}".toLowerCase()
.replace("/", "")
.replace('-', '_')
.replace("/", "")
.replace('-', '_')

def param = URLEncodedUtils.parse(uri, StandardCharsets.UTF_8.name())
.stream().findFirst()
.map({ it.value })
.orElse(null)
.stream().findFirst()
.map({ it.value })
.orElse(null)

def isTestServer = headers.get("is-test-server")
def requestId = headers.get("test-request-id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ dependencies {
testLibrary("org.apache.cxf:cxf-rt-transports-http-jetty:3.2.0")
testLibrary("org.apache.cxf:cxf-rt-ws-policy:3.2.0")

latestDepTestLibrary("org.eclipse.jetty:jetty-webapp:10.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxrs:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http-jetty:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-ws-policy:3.+")
latestDepTestLibrary("org.eclipse.jetty:jetty-webapp:10.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxrs:3.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http-jetty:3.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-ws-policy:3.+") // documented limitation
}

tasks.withType<Test>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies {
latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:3.0.+") { // see jaxrs-3.0-resteasy-3.1 module
exclude("org.jboss.resteasy", "resteasy-client")
}
latestDepTestLibrary("io.undertow:undertow-servlet:2.2.24.Final") // 2.3 switches to Servlet 5 / Jakarta namespace
latestDepTestLibrary("io.undertow:undertow-servlet:2.2.24.Final") // see jaxrs-3.0-resteasy-3.1 module
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ dependencies {
testLibrary("org.jboss.resteasy:resteasy-servlet-initializer:3.1.0.Final")

// artifact name changed from 'resteasy-jaxrs' to 'resteasy-core' starting from version 4.0.0
latestDepTestLibrary("org.jboss.resteasy:resteasy-core:5.+")
latestDepTestLibrary("org.jboss.resteasy:resteasy-servlet-initializer:5.+")
latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:5.+") {
latestDepTestLibrary("org.jboss.resteasy:resteasy-core:5.+") // documented limitation
latestDepTestLibrary("org.jboss.resteasy:resteasy-servlet-initializer:5.+") // documented limitation
latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:5.+") { // documented limitation
exclude("org.jboss.resteasy", "resteasy-client")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:jetty:jetty-8.0:javaagent"))

latestDepTestLibrary("com.sun.xml.ws:jaxws-rt:2.+")
latestDepTestLibrary("com.sun.xml.stream.buffer:streambuffer:1.+")
latestDepTestLibrary("com.sun.xml.ws:jaxws-rt:2.+") // see jaxws-3.0-metro-2.2-testing module
latestDepTestLibrary("com.sun.xml.stream.buffer:streambuffer:1.+") // see jaxws-3.0-metro-2.2-testing module
}

tasks.withType<Test>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ dependencies {
testImplementation("javax.annotation:javax.annotation-api:1.2")
testImplementation("com.sun.xml.messaging.saaj:saaj-impl:1.5.2")

latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxws:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxws:3.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http:3.+") // documented limitation
}

tasks.withType<Test>().configureEach {
Expand Down
3 changes: 2 additions & 1 deletion instrumentation/jdbc/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ dependencies {
testLibrary("com.zaxxer:HikariCP:2.4.0")
testLibrary("com.mchange:c3p0:0.9.5")

latestDepTestLibrary("org.apache.derby:derby:10.14.+")
// some classes in earlier versions of derby were split out into derbytools in later versions
latestDepTestLibrary("org.apache.derby:derbytools:+")

testImplementation(project(":instrumentation:jdbc:testing"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ dependencies {

testImplementation(project(":instrumentation:jetty-httpclient::jetty-httpclient-9.2:testing"))

latestDepTestLibrary("org.eclipse.jetty:jetty-client:9.+")
latestDepTestLibrary("org.eclipse.jetty:jetty-client:9.+") // documented limitation
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {

// jetty-servlet does not exist in jetty 12, so we don't need to explicitly pin it to 11.+
testLibrary("org.eclipse.jetty:jetty-servlet:11.0.0")
latestDepTestLibrary("org.eclipse.jetty:jetty-server:11.+")
latestDepTestLibrary("org.eclipse.jetty:jetty-server:11.+") // see jetty-12.0 module
}

otelJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-5.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-common:javaagent"))

latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+")
latestDepTestLibrary("jakarta.faces:jakarta.faces-api:3.+")
latestDepTestLibrary("org.glassfish:jakarta.faces:3.+")
// JSF 4+ requires CDI instead of BeanManager, the test should be upgraded first
// latestDepTestLibrary("org.glassfish:jakarta.faces:4.+")
latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+") // documented limitation
latestDepTestLibrary("jakarta.faces:jakarta.faces-api:3.+") // documented limitation
latestDepTestLibrary("org.glassfish:jakarta.faces:3.+") // documented limitation
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-5.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-common:javaagent"))

latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+")
latestDepTestLibrary("org.apache.myfaces.core:myfaces-api:3.+")
latestDepTestLibrary("org.apache.myfaces.core:myfaces-impl:3.+")
// JSF 4+ requires CDI instead of BeanManager, the test should be upgraded first
// latestDepTestLibrary("org.apache.myfaces.core:myfaces-impl:4.+")
latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+") // documented limitation
latestDepTestLibrary("org.apache.myfaces.core:myfaces-api:3.+") // documented limitation
latestDepTestLibrary("org.apache.myfaces.core:myfaces-impl:3.+") // documented limitation
}

tasks {
Expand Down
12 changes: 5 additions & 7 deletions instrumentation/jsp-2.3/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ muzzle {
dependencies {
// compiling against tomcat 7.0.20 because there seems to be some issues with Tomcat's dependency < 7.0.20
compileOnly("org.apache.tomcat:tomcat-jasper:7.0.20")
compileOnly("javax.servlet.jsp:javax.servlet.jsp-api:2.3.0")
compileOnly("javax.servlet:javax.servlet-api:3.1.0")
library("javax.servlet.jsp:javax.servlet.jsp-api:2.3.0")
library("javax.servlet:javax.servlet-api:3.1.0")

testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
Expand All @@ -40,11 +40,9 @@ dependencies {
testLibrary("org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.37")
testLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:7.0.37")

latestDepTestLibrary("javax.servlet.jsp:javax.servlet.jsp-api:+")
latestDepTestLibrary("javax.servlet:javax.servlet-api:+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-core:9.+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:9.+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-logging-juli:9.+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-core:9.+") // documented limitation
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:9.+") // documented limitation
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-logging-juli:9.+") // documented limitation
}

tasks.withType<Test>().configureEach {
Expand Down
Loading

0 comments on commit 8dd4557

Please sign in to comment.