From 184af964eedf5e6e52b409b90fb6b9ed065be191 Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Thu, 24 Apr 2025 16:03:42 -0400 Subject: [PATCH 1/3] Revert "Adjust way to get changed files (#8709)" This reverts commit 7dc621f3bb22dd3626266e4ceb7bfa8e1ee883fe. --- .circleci/config.continue.yml.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.continue.yml.j2 b/.circleci/config.continue.yml.j2 index af1770db9d7..027f914fbec 100644 --- a/.circleci/config.continue.yml.j2 +++ b/.circleci/config.continue.yml.j2 @@ -167,8 +167,7 @@ commands: if [[ "$BRANCH" != "master" ]] && [[ "$BRANCH" != "release/*" ]]; then # We know that we have checked out the PR merge branch, so the HEAD commit is a merge # As a backup, if anything goes wrong with the diff, the build will fail - # Get list of changed files directly using git diff-tree to avoid issues with large binary files - CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r HEAD) + CHANGED_FILES=$(git show HEAD | grep -e "^Merge:" | cut -d ' ' -f 2- | sed 's/ /.../' | xargs git diff --name-only) # Count the number of matches, and ignore if the grep doesn't match anything MATCH_COUNT=$(echo "$CHANGED_FILES" | grep -c -E "<< pipeline.parameters.global_pattern >>|<< parameters.pattern >>") || true if [[ "$MATCH_COUNT" -eq "0" ]]; then From 14f65792890fe6d2e0de6048f2d9dc15e1930eb0 Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Fri, 25 Apr 2025 10:06:11 -0400 Subject: [PATCH 2/3] Patch AbstractSparkListenerTest --- .../spark/AbstractSparkListenerTest.groovy | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dd-java-agent/instrumentation/spark/src/testFixtures/groovy/datadog/trace/instrumentation/spark/AbstractSparkListenerTest.groovy b/dd-java-agent/instrumentation/spark/src/testFixtures/groovy/datadog/trace/instrumentation/spark/AbstractSparkListenerTest.groovy index 47367fbef82..c7c14e95a50 100644 --- a/dd-java-agent/instrumentation/spark/src/testFixtures/groovy/datadog/trace/instrumentation/spark/AbstractSparkListenerTest.groovy +++ b/dd-java-agent/instrumentation/spark/src/testFixtures/groovy/datadog/trace/instrumentation/spark/AbstractSparkListenerTest.groovy @@ -475,9 +475,20 @@ abstract class AbstractSparkListenerTest extends AgentTestRunner { conf.set("spark.openlineage.rootParentJobName", "dag-push-to-s3-spark") def listener = getTestDatadogSparkListener(conf) - expect: + when: listener.onApplicationStart(applicationStartEvent(1000L)) - assert listener.openLineageSparkConf.get("spark.openlineage.run.tags").contains("13959090542865903119") + listener.onApplicationEnd(new SparkListenerApplicationEnd(2000L)) + + then: + assertTraces(1) { + trace(1) { + span { + operationName "spark.application" + spanType "spark" + assert span.context.traceId.toString() == "13959090542865903119" + } + } + } } def "test lastJobFailed is not set when job is cancelled"() { From 621a4a1559b67edb7ea422d477e78a888684f519 Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Fri, 25 Apr 2025 15:03:43 -0400 Subject: [PATCH 3/3] Force byte-buddy version for mule4 --- dd-java-agent/instrumentation/mule-4/build.gradle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dd-java-agent/instrumentation/mule-4/build.gradle b/dd-java-agent/instrumentation/mule-4/build.gradle index cdb9bd279a3..98afc3060a4 100644 --- a/dd-java-agent/instrumentation/mule-4/build.gradle +++ b/dd-java-agent/instrumentation/mule-4/build.gradle @@ -78,6 +78,9 @@ configurations.all { // avoid bringing in logback based on java 11 force libs.logback.classic force libs.logback.core + + // force specific version of byte-buddy for all configurations + force 'net.bytebuddy:byte-buddy:1.14.18' } } @@ -146,7 +149,6 @@ dependencies { testImplementation project(':dd-java-agent:instrumentation:caffeine') testImplementation project(':dd-java-agent:instrumentation:quartz-2') - testImplementation group: 'org.mule.runtime', name: 'mule-module-launcher', version: muleVersion testImplementation group: 'org.mule.runtime', name: 'mule-core', version: muleVersion //testImplementation group: 'org.mule.runtime', name: 'mule-module-extensions-spring-support', version: muleVersion @@ -175,7 +177,6 @@ dependencies { latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-service', version: '4.8.+' latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-javaee', version: '4.8.+' - //TODO: 4.9.0 is not yet out but it looks like using 4.+ instead of above 4.8.+ brings in 4.9.0-SNAPSHOT artifacts. /* When testing with them, the mule container does not bootstrap because of: