Skip to content

Commit 10d4bdf

Browse files
Merge branch 'master' into alexeyk/refactored-env-vars-to-be-testable
2 parents 4003775 + 79f2e72 commit 10d4bdf

File tree

120 files changed

+3912
-1243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+3912
-1243
lines changed

buildSrc/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ testing {
7676
val integTest by registering(JvmTestSuite::class) {
7777
dependencies {
7878
implementation(gradleTestKit())
79-
implementation("org.assertj:assertj-core:3.25.3")
8079
}
8180
// Makes the gradle plugin publish its declared plugins to this source set
8281
gradlePlugin.testSourceSet(sources)

buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package datadog.gradle.plugin.version
22

3-
import org.assertj.core.api.Assertions.assertThat
43
import org.gradle.testkit.runner.GradleRunner
5-
import org.junit.jupiter.api.Disabled
4+
import org.junit.jupiter.api.Assertions.assertEquals
65
import org.junit.jupiter.api.Test
7-
import org.junit.jupiter.api.io.CleanupMode
86
import org.junit.jupiter.api.io.TempDir
97
import java.io.File
108
import java.io.IOException
@@ -289,7 +287,7 @@ class TracerVersionIntegrationTest {
289287
// .withDebug(true)
290288
.build()
291289

292-
assertThat(buildResult.output).isEqualToIgnoringNewLines(expectedVersion)
290+
assertEquals(expectedVersion, buildResult.output.lines().first())
293291
}
294292

295293
private fun exec(workingDirectory: File, vararg args: String) {

communication/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ dependencies {
2323

2424
testImplementation(project(":utils:test-utils"))
2525
testImplementation(libs.bundles.junit5)
26-
testImplementation(libs.truth)
2726
testImplementation(libs.bytebuddy)
2827
testImplementation("org.msgpack:msgpack-core:0.8.20")
2928
testImplementation("org.msgpack:jackson-dataformat-msgpack:0.8.20")

communication/gradle.lockfile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,8 @@ com.github.spotbugs:spotbugs-annotations:4.2.0=compileClasspath,testCompileClass
3232
com.github.spotbugs:spotbugs-annotations:4.7.3=spotbugs
3333
com.github.spotbugs:spotbugs:4.7.3=spotbugs
3434
com.github.stefanbirkner:system-rules:1.19.0=testCompileClasspath,testRuntimeClasspath
35-
com.google.auto.value:auto-value-annotations:1.8.1=testCompileClasspath,testRuntimeClasspath
3635
com.google.code.findbugs:jsr305:3.0.2=compileClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
3736
com.google.code.gson:gson:2.9.1=spotbugs
38-
com.google.errorprone:error_prone_annotations:2.7.1=testCompileClasspath,testRuntimeClasspath
39-
com.google.guava:failureaccess:1.0.1=testCompileClasspath,testRuntimeClasspath
40-
com.google.guava:guava:30.1.1-android=testCompileClasspath,testRuntimeClasspath
41-
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=testCompileClasspath,testRuntimeClasspath
42-
com.google.j2objc:j2objc-annotations:1.3=testCompileClasspath,testRuntimeClasspath
43-
com.google.truth:truth:1.1.3=testCompileClasspath,testRuntimeClasspath
4437
com.squareup.moshi:moshi:1.11.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4538
com.squareup.okhttp3:mockwebserver:3.12.12=testCompileClasspath,testRuntimeClasspath
4639
com.squareup.okhttp3:okhttp:3.12.12=testCompileClasspath,testRuntimeClasspath
@@ -75,8 +68,6 @@ org.apache.httpcomponents.core5:httpcore5:5.1.3=spotbugs
7568
org.apache.logging.log4j:log4j-api:2.19.0=spotbugs
7669
org.apache.logging.log4j:log4j-core:2.19.0=spotbugs
7770
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
78-
org.checkerframework:checker-compat-qual:2.5.5=testCompileClasspath,testRuntimeClasspath
79-
org.checkerframework:checker-qual:3.13.0=testCompileClasspath,testRuntimeClasspath
8071
org.codehaus.groovy:groovy-all:3.0.24=testCompileClasspath,testRuntimeClasspath
8172
org.codehaus.groovy:groovy-ant:3.0.23=codenarc
8273
org.codehaus.groovy:groovy-ant:3.0.24=testCompileClasspath,testRuntimeClasspath
@@ -144,8 +135,7 @@ org.ow2.asm:asm-tree:9.8=jacocoAnt
144135
org.ow2.asm:asm-util:7.1=compileClasspath,testCompileClasspath
145136
org.ow2.asm:asm-util:9.2=runtimeClasspath,testRuntimeClasspath
146137
org.ow2.asm:asm-util:9.4=spotbugs
147-
org.ow2.asm:asm:7.1=compileClasspath
148-
org.ow2.asm:asm:9.1=testCompileClasspath
138+
org.ow2.asm:asm:7.1=compileClasspath,testCompileClasspath
149139
org.ow2.asm:asm:9.2=runtimeClasspath,testRuntimeClasspath
150140
org.ow2.asm:asm:9.4=spotbugs
151141
org.ow2.asm:asm:9.8=jacocoAnt

communication/src/main/java/datadog/communication/ddagent/DDAgentFeaturesDiscovery.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,11 @@ private boolean processInfoResponse(State newState, String response) {
271271
newState.debuggerLogEndpoint = DEBUGGER_ENDPOINT_V1;
272272
}
273273
// both debugger v2 and diagnostics endpoints are forwarding events to the DEBUGGER intake
274-
// because older agents support diagnostics, we fall back to it before falling back to v1
274+
// because older agents support diagnostics from DD agent 7.49
275275
if (containsEndpoint(endpoints, DEBUGGER_ENDPOINT_V2)) {
276276
newState.debuggerSnapshotEndpoint = DEBUGGER_ENDPOINT_V2;
277277
} else if (containsEndpoint(endpoints, DEBUGGER_DIAGNOSTICS_ENDPOINT)) {
278278
newState.debuggerSnapshotEndpoint = DEBUGGER_DIAGNOSTICS_ENDPOINT;
279-
} else if (containsEndpoint(endpoints, DEBUGGER_ENDPOINT_V1)) {
280-
newState.debuggerSnapshotEndpoint = DEBUGGER_ENDPOINT_V1;
281279
}
282280
if (containsEndpoint(endpoints, DEBUGGER_DIAGNOSTICS_ENDPOINT)) {
283281
newState.debuggerDiagnosticsEndpoint = DEBUGGER_DIAGNOSTICS_ENDPOINT;

communication/src/test/groovy/datadog/communication/ddagent/DDAgentFeaturesDiscoveryTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
440440
1 * client.newCall(_) >> { Request request -> infoResponse(request, INFO_WITH_TELEMETRY_PROXY_RESPONSE) }
441441
features.supportsTelemetryProxy()
442442
features.supportsDebugger()
443-
features.getDebuggerSnapshotEndpoint() == "debugger/v1/input"
444-
!features.supportsDebuggerDiagnostics()
443+
features.getDebuggerSnapshotEndpoint() == "debugger/v1/diagnostics"
444+
features.supportsDebuggerDiagnostics()
445445
0 * _
446446
}
447447

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
package datadog.communication.http
22

3-
import com.google.common.truth.Truth
43
import okhttp3.Request
5-
import org.junit.jupiter.api.Assertions
64
import org.junit.jupiter.api.Test
75

6+
import static org.junit.jupiter.api.Assertions.assertFalse
7+
import static org.junit.jupiter.api.Assertions.assertThrows
8+
import static org.junit.jupiter.api.Assertions.assertTrue
9+
810
class SafeRequestBuilderTest {
911
Request.Builder testBuilder = new Request.Builder()
1012

1113
@Test
1214
void "test adding bad header"() {
1315
def name = 'bad'
1416
def password = 'very-secret-password'
15-
IllegalArgumentException ex = Assertions.assertThrows(IllegalArgumentException, {
17+
IllegalArgumentException ex = assertThrows(IllegalArgumentException, {
1618
testBuilder.url("http:localhost").addHeader(name, "$password\n")
1719
})
18-
Truth.assertThat(ex).hasMessageThat().contains(name)
19-
Truth.assertThat(ex).hasMessageThat().doesNotContain(password)
20+
assertTrue(ex.getMessage().contains(name))
21+
assertFalse(ex.getMessage().contains(password))
2022
}
23+
2124
@Test
2225
void "test adding bad header2"(){
2326
def name = '\u0019'
2427
def password = 'very-secret-password'
25-
IllegalArgumentException ex = Assertions.assertThrows(IllegalArgumentException, {
28+
IllegalArgumentException ex = assertThrows(IllegalArgumentException, {
2629
testBuilder.url("http:localhost").addHeader(name, "\u0080$password")
2730
})
28-
Truth.assertThat(ex).hasMessageThat().contains(name)
29-
Truth.assertThat(ex).hasMessageThat().doesNotContain(password)
31+
assertTrue(ex.getMessage().contains(name))
32+
assertFalse(ex.getMessage().contains(password))
3033
}
3134
}

communication/src/test/resources/agent-features/agent-info-with-telemetry-proxy.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"/evp_proxy/v1/",
1616
"/evp_proxy/v2/",
1717
"/debugger/v1/input",
18+
"/debugger/v1/diagnostics",
1819
"/v0.7/config"
1920
],
2021
"feature_flags": [

dd-java-agent/agent-ci-visibility/civisibility-instrumentation-test-fixtures/gradle.lockfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ com.datadoghq.okio:okio:1.17.6=compileClasspath,runtimeClasspath,testCompileClas
1212
com.datadoghq:dd-javac-plugin-client:0.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
1313
com.datadoghq:java-dogstatsd-client:4.4.3=runtimeClasspath,testRuntimeClasspath
1414
com.datadoghq:sketches-java:0.8.3=runtimeClasspath,testRuntimeClasspath
15-
com.fasterxml.jackson.core:jackson-annotations:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
16-
com.fasterxml.jackson.core:jackson-core:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
17-
com.fasterxml.jackson.core:jackson-databind:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
18-
com.fasterxml.jackson:jackson-bom:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
15+
com.fasterxml.jackson.core:jackson-annotations:2.20=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
16+
com.fasterxml.jackson.core:jackson-core:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
17+
com.fasterxml.jackson.core:jackson-databind:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
18+
com.fasterxml.jackson:jackson-bom:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
1919
com.github.javaparser:javaparser-core:3.25.6=codenarc,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
2020
com.github.jnr:jffi:1.3.13=runtimeClasspath,testRuntimeClasspath
2121
com.github.jnr:jnr-a64asm:1.0.0=runtimeClasspath,testRuntimeClasspath

dd-java-agent/agent-ci-visibility/civisibility-test-fixtures/gradle.lockfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ com.datadoghq.okio:okio:1.17.6=compileClasspath,runtimeClasspath,testCompileClas
1212
com.datadoghq:dd-javac-plugin-client:0.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
1313
com.datadoghq:java-dogstatsd-client:4.4.3=runtimeClasspath,testRuntimeClasspath
1414
com.datadoghq:sketches-java:0.8.3=runtimeClasspath,testRuntimeClasspath
15-
com.fasterxml.jackson.core:jackson-annotations:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
16-
com.fasterxml.jackson.core:jackson-core:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
17-
com.fasterxml.jackson.core:jackson-databind:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
18-
com.fasterxml.jackson:jackson-bom:2.16.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
15+
com.fasterxml.jackson.core:jackson-annotations:2.20=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
16+
com.fasterxml.jackson.core:jackson-core:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
17+
com.fasterxml.jackson.core:jackson-databind:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
18+
com.fasterxml.jackson:jackson-bom:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
1919
com.github.javaparser:javaparser-core:3.25.6=codenarc,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
2020
com.github.jnr:jffi:1.3.13=runtimeClasspath,testRuntimeClasspath
2121
com.github.jnr:jnr-a64asm:1.0.0=runtimeClasspath,testRuntimeClasspath

0 commit comments

Comments
 (0)