From e264684d3a3560dd006a026c8404fbc7f823801f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Radunsky?= Date: Wed, 12 Feb 2025 15:27:12 -0300 Subject: [PATCH 1/6] W-17792569: bump cli to dw latest --- gradle.properties | 6 +++--- native-cli-integration-tests/build.gradle | 1 + .../scala/org/mule/weave/native/NativeCliRuntimeIT.scala | 8 ++++++-- .../scala/org/mule/weave/dwnative/NativeRuntime.scala | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index b13d568..809cb74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ -weaveVersion=2.8.0-SNAPSHOT -weaveTestSuiteVersion=2.8.0-SNAPSHOT +weaveVersion=2.10.0-SNAPSHOT +weaveTestSuiteVersion=2.10.0-SNAPSHOT nativeVersion=100.100.100 -scalaVersion=2.12.15 +scalaVersion=2.12.18 ioVersion=1.0.0-SNAPSHOT graalvmVersion=22.3.3 #Libaries diff --git a/native-cli-integration-tests/build.gradle b/native-cli-integration-tests/build.gradle index 72907a6..66d63fa 100644 --- a/native-cli-integration-tests/build.gradle +++ b/native-cli-integration-tests/build.gradle @@ -22,6 +22,7 @@ dependencies { weaveSuite "org.mule.weave:runtime:${weaveTestSuiteVersion}:test@zip" weaveSuite "org.mule.weave:yaml-module:${weaveTestSuiteVersion}:test@zip" + weaveSuite "org.mule.weave:core-modules:${weaveTestSuiteVersion}:test@zip" testRuntimeOnly 'com.vladsch.flexmark:flexmark-all:0.62.2' testImplementation 'commons-io:commons-io:2.11.0' testImplementation group: 'com.sun.mail', name: 'jakarta.mail', version: '1.6.4' diff --git a/native-cli-integration-tests/src/test/scala/org/mule/weave/native/NativeCliRuntimeIT.scala b/native-cli-integration-tests/src/test/scala/org/mule/weave/native/NativeCliRuntimeIT.scala index 8311cf9..b448187 100644 --- a/native-cli-integration-tests/src/test/scala/org/mule/weave/native/NativeCliRuntimeIT.scala +++ b/native-cli-integration-tests/src/test/scala/org/mule/weave/native/NativeCliRuntimeIT.scala @@ -64,7 +64,9 @@ class NativeCliRuntimeIT extends AnyFunSpec val testSuites = Seq( TestSuite("master", loadTestZipFile(s"weave-suites/runtime-$weaveVersion-test.zip")), - TestSuite("yaml", loadTestZipFile(s"weave-suites/yaml-module-$weaveVersion-test.zip")) + TestSuite("yaml", loadTestZipFile(s"weave-suites/yaml-module-$weaveVersion-test.zip")), + TestSuite("yaml", loadTestZipFile(s"weave-suites/core-modules-$weaveVersion-test.zip")), + ) private def loadTestZipFile(testSuiteExample: String): File = { @@ -218,8 +220,8 @@ class NativeCliRuntimeIT extends AnyFunSpec val (exitCode, _, _) = NativeCliITTestRunner(args).execute(TIMEOUT._1, TIMEOUT._2) - exitCode shouldBe 0 doAssert(outputPath.toFile, scenario.output, maybeEncoding) + exitCode shouldBe 0 } } } @@ -374,6 +376,8 @@ class NativeCliRuntimeIT extends AnyFunSpec "read-binary-files", "underflow", "try", + "try-handle-attribute-delegate-with-failures", + "try-handle-lazy-values-with-failures", "urlEncodeDecode") ++ // Uses resource name that is different on Cli than in the Tests Array("try-recursive-call", "runtime_orElseTry") ++ diff --git a/native-cli/src/main/scala/org/mule/weave/dwnative/NativeRuntime.scala b/native-cli/src/main/scala/org/mule/weave/dwnative/NativeRuntime.scala index ef4a12f..573d01c 100644 --- a/native-cli/src/main/scala/org/mule/weave/dwnative/NativeRuntime.scala +++ b/native-cli/src/main/scala/org/mule/weave/dwnative/NativeRuntime.scala @@ -7,7 +7,7 @@ import org.mule.weave.dwnative.utils.DataWeaveUtils import org.mule.weave.v2.core.exception.InvalidLocationException import org.mule.weave.v2.core.io.service.CustomWorkingDirectoryService import org.mule.weave.v2.core.io.service.WorkingDirectoryService -import org.mule.weave.v2.interpreted.CustomRuntimeModuleNodeCompiler +import org.mule.weave.v2.interpreted.CompositeRuntimeModuleNodeCompiler import org.mule.weave.v2.interpreted.RuntimeModuleNodeCompiler import org.mule.weave.v2.interpreted.module.WeaveDataFormat import org.mule.weave.v2.model.EvaluationContext @@ -187,7 +187,7 @@ class NativeModuleComponentFactory(dynamicLevel: () => WeaveResourceResolver, sy val weaveResourceResolver = dynamicLevel() val currentClassloader: ModuleParsingPhasesManager = ModuleParsingPhasesManager(ModuleLoaderManager(Seq(ModuleLoader(weaveResourceResolver)), new SPIBasedModuleLoaderProvider(weaveResourceResolver))) val parser: CompositeModuleParsingPhasesManager = CompositeModuleParsingPhasesManager(NativeSystemModuleComponents.systemModuleParser, currentClassloader) - val compiler: CustomRuntimeModuleNodeCompiler = RuntimeModuleNodeCompiler.chain(currentClassloader, systemModuleCompiler, parentLast = !systemFirst) + val compiler = RuntimeModuleNodeCompiler.chain(currentClassloader, systemModuleCompiler, parentLast = !systemFirst) ModuleComponents(new TwoLevelWeaveResourceResolver(NativeSystemModuleComponents.systemResourceResolver, () => weaveResourceResolver), parser, compiler) } } From c953a1b10a7f68b3f1ddeec6a13577e87ade57f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Radunsky?= Date: Fri, 14 Feb 2025 14:02:33 -0300 Subject: [PATCH 2/6] update deprecated action --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e24f11c..4ac4ac7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,7 +73,7 @@ jobs: # Upload the artifact file - name: Upload generated script - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dw-${{env.NATIVE_VERSION}}-${{runner.os}} path: native-cli/build/distributions/native-cli-${{env.NATIVE_VERSION}}-native-distro-${{ matrix.script_name }}.zip From ee45f728bb15461678be85417d9dc031a7800644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Radunsky?= Date: Fri, 14 Feb 2025 14:59:50 -0300 Subject: [PATCH 3/6] try previous graalvm version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 809cb74..fac973c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ weaveTestSuiteVersion=2.10.0-SNAPSHOT nativeVersion=100.100.100 scalaVersion=2.12.18 ioVersion=1.0.0-SNAPSHOT -graalvmVersion=22.3.3 +graalvmVersion=22.3.2 #Libaries scalaTestVersion=3.2.15 scalaTestPluginVersion=0.32 From 7507a6d248df0068e9b0e1466a94d53a1936c012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Radunsky?= Date: Fri, 14 Feb 2025 15:11:49 -0300 Subject: [PATCH 4/6] pin macos version to amd64 arch --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8cc5a3a..17a665b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,13 +12,14 @@ jobs: RELEASE_EXTENSION: strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + #newer macos distributions use aarch64 arch which has no graalvm version available for java 11 + os: [macos-14, ubuntu-latest, windows-latest] include: - os: windows-latest script_name: windows - os: ubuntu-latest script_name: linux - - os: macos-latest + - os: macos-14 script_name: osx runs-on: ${{ matrix.os }} From 9646a33a039cc1ecd03e74838f386a268b2f3468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Radunsky?= Date: Fri, 14 Feb 2025 15:13:42 -0300 Subject: [PATCH 5/6] change macos in main yml too --- .github/workflows/main.yml | 5 +++-- gradle.properties | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ac4ac7..1d62f01 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,13 +17,14 @@ jobs: BUILD: strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + #newer macos distributions use aarch64 arch which has no graalvm version available for java 11 + os: [ ubuntu-latest, windows-latest, macos-14 ] include: - os: windows-latest script_name: windows - os: ubuntu-latest script_name: linux - - os: macos-latest + - os: macos-14 script_name: osx runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job diff --git a/gradle.properties b/gradle.properties index fac973c..809cb74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ weaveTestSuiteVersion=2.10.0-SNAPSHOT nativeVersion=100.100.100 scalaVersion=2.12.18 ioVersion=1.0.0-SNAPSHOT -graalvmVersion=22.3.2 +graalvmVersion=22.3.3 #Libaries scalaTestVersion=3.2.15 scalaTestPluginVersion=0.32 From aeb8c1900657bc55c76506e49565b466c6af9d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Radunsky?= Date: Fri, 14 Feb 2025 15:17:23 -0300 Subject: [PATCH 6/6] another try --- .github/workflows/main.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d62f01..b2a8238 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,13 +18,13 @@ jobs: strategy: matrix: #newer macos distributions use aarch64 arch which has no graalvm version available for java 11 - os: [ ubuntu-latest, windows-latest, macos-14 ] + os: [ ubuntu-latest, windows-latest, macos-14-arm64 ] include: - os: windows-latest script_name: windows - os: ubuntu-latest script_name: linux - - os: macos-14 + - os: macos-14-arm64 script_name: osx runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17a665b..6dcc602 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,13 +13,13 @@ jobs: strategy: matrix: #newer macos distributions use aarch64 arch which has no graalvm version available for java 11 - os: [macos-14, ubuntu-latest, windows-latest] + os: [macos-14-arm64, ubuntu-latest, windows-latest] include: - os: windows-latest script_name: windows - os: ubuntu-latest script_name: linux - - os: macos-14 + - os: macos-14-arm64 script_name: osx runs-on: ${{ matrix.os }}