Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ dependencies {
// 3.0 introduces submit() methods
// 4.0 introduces submitListenable() methods
testLibrary("org.springframework:spring-core:4.0.0.RELEASE")

latestDepTestLibrary("org.springframework:spring-core:6.+") // documented limitation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is that documented?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a script that checks build scripts for latestDepTestLibrary dependencies that restrict the version. It expects there to be a comment that explains why the restriction was set. See https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/.github/scripts/check-latest-dep-test-overrides.sh Arguably here a better comment could be used.

}

// spring 6 requires java 17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plugins {
id("otel.javaagent-testing")
}

val testLatestDeps = findProperty("testLatestDeps") as Boolean

dependencies {
testInstrumentation(project(":instrumentation:jdbc:javaagent"))
testInstrumentation(project(":instrumentation:r2dbc-1.0:javaagent"))
Expand All @@ -20,6 +22,15 @@ dependencies {
testImplementation("org.hsqldb:hsqldb:2.0.0")
testImplementation("com.h2database:h2:1.4.197")
testImplementation("io.r2dbc:r2dbc-h2:1.0.0.RELEASE")

if (testLatestDeps) {
// Exclude Spring Framework 7.0+ until compatible version available
testImplementation("org.springframework:spring-core") {
version {
strictly("[6.0,7.0[")
}
}
}
}

otelJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ muzzle {
}
}

val testLatestDeps = findProperty("testLatestDeps") as Boolean

dependencies {
implementation(project(":instrumentation:spring:spring-security-config-6.0:library"))

Expand All @@ -23,11 +25,25 @@ dependencies {

testLibrary("org.springframework:spring-test:6.0.0")
testLibrary("org.springframework:spring-context:6.0.0")
// can't use testLibrary for now because 6.2.0-M1 is latest and its POM referes to a missing
// can't use testLibrary for now because 6.2.0-M1 is latest and its POM refers to a missing
// parent POM, switch back to testLibrary when a new version is released
// testLibrary("jakarta.servlet:jakarta.servlet-api:6.0.0")
testImplementation("jakarta.servlet:jakarta.servlet-api:6.0.0")
latestDepTestLibrary("jakarta.servlet:jakarta.servlet-api:6.1.0") // documented limitation

if (testLatestDeps) {
// Exclude Spring Framework 7.0+ until compatible version available
testImplementation("org.springframework:spring-context") {
version {
strictly("[6.0,7.0[")
}
}
testImplementation("org.springframework:spring-test") {
version {
strictly("[6.0,7.0[")
}
}
}
}

otelJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plugins {
id("otel.library-instrumentation")
}

val testLatestDeps = findProperty("testLatestDeps") as Boolean

dependencies {
library("org.springframework.security:spring-security-config:6.0.0")
library("org.springframework.security:spring-security-web:6.0.0")
Expand All @@ -17,6 +19,30 @@ dependencies {
implementation(project(":instrumentation:reactor:reactor-3.1:library"))

testLibrary("org.springframework:spring-test:6.0.0")

if (testLatestDeps) {
// Exclude Spring Framework 7.0+ until compatible version available
testImplementation("org.springframework:spring-core") {
version {
strictly("[6.0,7.0[")
}
}
testImplementation("org.springframework:spring-context") {
version {
strictly("[6.0,7.0[")
}
}
testImplementation("org.springframework:spring-web") {
version {
strictly("[6.0,7.0[")
}
}
testImplementation("org.springframework:spring-test") {
version {
strictly("[6.0,7.0[")
}
}
}
}

otelJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@ plugins {
id("otel.library-instrumentation")
}

val latestDepTest = findProperty("testLatestDeps") as Boolean

dependencies {
compileOnly("org.springframework:spring-web:3.1.0.RELEASE")

testLibrary("org.springframework:spring-web:3.1.0.RELEASE")

testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
}

val latestDepTest = findProperty("testLatestDeps") as Boolean
if (latestDepTest) {
// Exclude Spring Framework 7.0+ until compatible version available
testImplementation("org.springframework:spring-web") {
version {
strictly("[6.0,7.0[")
}
}
}
}

// spring 6 requires java 17
if (latestDepTest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ if (latestDepTest) {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

// Exclude Spring Framework 7.0+ until compatible version available
dependencies {
testImplementation("org.springframework:spring-webflux") {
version {
strictly("[6.0,7.0[")
}
}
}
}

if (!latestDepTest) {
Expand Down
Loading