Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrument Mulesoft 4.5.0+ #7981

Merged
merged 24 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
clean latestDep
  • Loading branch information
amarziali committed Nov 29, 2024
commit 3401b567ffce62c7278a23d02b28b0163b3cbb4b
31 changes: 4 additions & 27 deletions dd-java-agent/instrumentation/mule-4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ext {
forkedTestMaxJavaVersionForTests = JavaVersion.VERSION_11
mule46ForkedTestMaxJavaVersionForTests = JavaVersion.VERSION_11
latestDepForkedTestMinJavaVersionForTests = JavaVersion.VERSION_17
latestDepForkedTestMaxJavaVersionForTests = JavaVersion.VERSION_17
}

muzzle {
Expand Down Expand Up @@ -35,12 +36,6 @@ addTestSuiteForDir('latestDepForkedTest', 'test')
def muleVersion = '4.5.0'
amarziali marked this conversation as resolved.
Show resolved Hide resolved
def appDir = "$projectDir/application"

clean.doFirst {
delete "$buildDir/mule/forkedTest"
delete "$buildDir/mule/mule46ForkedTest"
delete "$buildDir/mule/latestDepForkedTest"
}

repositories {
maven {
name "mulesoft-releases"
Expand Down Expand Up @@ -141,15 +136,15 @@ dependencies {
latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-core', version: '4.8.+'
latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-extensions-spring-support', version: '4.8.+'
latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-service', version: '4.8.+'
// this is needed for mule to find removed javax.* APIs on Java 11+
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.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will see if we can have a BOM for each version of mule in order to manage better the version of each submodule for the latestDep and address it in another PR

/*
When testing with them, the mule container does not bootstrap because of:
None of [protected void java.lang.Object.finalize() throws java.lang.Throwable, public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException, public final void java.lang.Object.wait() throws java.lang.InterruptedException, public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException, public boolean java.lang.Object.equals(java.lang.Object), public java.lang.String java.lang.Object.toString(), public native int java.lang.Object.hashCode(), public final native java.lang.Class java.lang.Object.getClass(), protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException, public final native void java.lang.Object.notify(), public final native void java.lang.Object.notifyAll(), public abstract java.lang.Object java.lang.reflect.InvocationHandler.invoke(java.lang.Object,java.lang.reflect.Method,java.lang.Object[]) throws java.lang.Throwable] allows for delegation from public boolean org.springframework.beans.factory.SmartFactoryBean.isEagerInit()
*/
latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-extensions-soap-api', version: '+'
latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-extensions-soap-api', version: '1.8.+'

latestDepForkedTestImplementation group: 'jakarta.xml.ws', name: 'jakarta.xml.ws-api', version: '4.0.2'
// back to the future
Expand All @@ -159,7 +154,7 @@ dependencies {

latestMuleServices group: 'org.mule.services', name: 'mule-service-http', version: '1.+', classifier: 'mule-service'
latestMuleServices group: 'org.mule.services', name: 'mule-service-scheduler', version: '1.+', classifier: 'mule-service'
latestMuleServices group: 'org.mule.services', name: 'mule-service-weave', version: '2.+', classifier: 'mule-service'
latestMuleServices group: 'org.mule.services', name: 'mule-service-weave', version: '2.8.1', classifier: 'mule-service'
}

def copyMuleArtifacts(String configName, String muleBaseDir, Sync sync) {
Expand Down Expand Up @@ -221,24 +216,6 @@ def createAppResourceTask(Task task, String name) {
}
}

tasks.named("test").configure {
outputs.upToDateWhen {
!mvnPackage.didWork && !extractMuleServices.didWork
}
}

tasks.named("mule46ForkedTest").configure {
outputs.upToDateWhen {
!mvnPackage.didWork && !extractMule46Services.didWork
}
}

tasks.named("latestDepForkedTest").configure {
outputs.upToDateWhen {
!mvnPackage.didWork && !latestDepForkedTest.didWork
}
}

spotless {
java {
target "**/*.java"
Expand Down