Skip to content

Commit eadfdea

Browse files
(@W-15110550): remove migrator command (#95)
* (@W-15110550): remove migrator command Co-authored-by: mlischetti <lischettim@gmail.com>
1 parent 1104f2a commit eadfdea

10 files changed

Lines changed: 28 additions & 105 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1515
jobs:
1616
# This workflow contains a single job called "build"
17-
OSX_LINUX_WINDOWS:
17+
BUILD:
1818
strategy:
1919
matrix:
2020
os: [ ubuntu-latest, windows-latest, macos-latest ]
@@ -54,16 +54,16 @@ jobs:
5454
#Run regression tests
5555
- name: Run regression test 2.7
5656
run: |
57-
./gradlew --stacktrace -PweaveTestSuiteVersion=2.7.0-SNAPSHOT native-cli-integration-tests:test
57+
./gradlew --stacktrace -PweaveTestSuiteVersion=2.7.0-SNAPSHOT -DweaveSuiteVersion=2.7.0-SNAPSHOT native-cli-integration-tests:test
5858
shell: bash
5959
#Run regression tests
6060
- name: Run regression test 2.6
6161
run: |
62-
./gradlew --stacktrace -PweaveTestSuiteVersion=2.6.1 native-cli-integration-tests:test
62+
./gradlew --stacktrace -PweaveTestSuiteVersion=2.6.1 -DweaveSuiteVersion=2.6.1 native-cli-integration-tests:test
6363
shell: bash
6464
- name: Run regression test 2.4
6565
run: |
66-
./gradlew --stacktrace -PweaveTestSuiteVersion=2.4.0-HF-SNAPSHOT native-cli-integration-tests:test
66+
./gradlew --stacktrace -PweaveTestSuiteVersion=2.4.0-HF-SNAPSHOT -DweaveSuiteVersion=2.4.0-HF-SNAPSHOT native-cli-integration-tests:test
6767
shell: bash
6868

6969
# Generate distro

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Commands:
9797
wizard Wizard actions.
9898
add Adds a new Wizard to your network of trusted wizards.
9999
validate Validate if a script is valid or not.
100-
migrate Translates a DW1 script into a DW2 script.
101100
spell Runs the specified Spell.
102101
create Creates a new spell with the given name.
103102
list List all available spells.

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
weaveVersion=2.7.0-SNAPSHOT
2-
weaveTestSuiteVersion=2.7.0-SNAPSHOT
1+
weaveVersion=2.8.0-SNAPSHOT
2+
weaveTestSuiteVersion=2.8.0-SNAPSHOT
33
nativeVersion=100.100.100
44
scalaVersion=2.12.15
55
ioVersion=1.0.0-SNAPSHOT

native-cli-integration-tests/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,10 @@ task downloadTestSuites(type: Copy) {
4141

4242
downloadTestSuites.dependsOn(cleanTestSuites)
4343
test.dependsOn(downloadTestSuites)
44-
test.dependsOn(":native-cli:nativeCompile")
44+
test.dependsOn(":native-cli:nativeCompile")
45+
46+
test {
47+
if (System.getProperty("weaveSuiteVersion") != null) {
48+
systemProperty "weaveSuiteVersion", System.getProperty("weaveSuiteVersion")
49+
}
50+
}

native-cli-integration-tests/src/test/scala/org/mule/weave/native/NativeCliRuntimeIT.scala

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ class NativeCliRuntimeIT extends AnyFunSpec
5858
private val INPUT_FILE_PATTERN = Pattern.compile("in[0-9]+\\.[a-zA-Z]+")
5959
private val OUTPUT_FILE_PATTERN = Pattern.compile("out\\.[a-zA-Z]+")
6060

61-
private val versionString: String = DataWeaveVersion(ComponentVersion.weaveSuiteVersion).toString()
61+
private val weaveVersion = System.getProperty("weaveSuiteVersion", ComponentVersion.weaveVersion)
62+
println(s"****** Running with weaveSuiteVersion: $weaveVersion *******")
63+
private val versionString: String = DataWeaveVersion(weaveVersion).toString()
6264

6365
val testSuites = Seq(
64-
TestSuite("master", loadTestZipFile(s"weave-suites/runtime-${ComponentVersion.weaveSuiteVersion}-test.zip")),
65-
TestSuite("yaml", loadTestZipFile(s"weave-suites/yaml-module-${ComponentVersion.weaveSuiteVersion}-test.zip"))
66+
TestSuite("master", loadTestZipFile(s"weave-suites/runtime-$weaveVersion-test.zip")),
67+
TestSuite("yaml", loadTestZipFile(s"weave-suites/yaml-module-$weaveVersion-test.zip"))
6668
)
6769

6870
private def loadTestZipFile(testSuiteExample: String): File = {
@@ -366,6 +368,7 @@ class NativeCliRuntimeIT extends AnyFunSpec
366368
"import-lib-with-alias",
367369
"import-named-lib",
368370
"import-star",
371+
"lazy_metadata_definition",
369372
"module-singleton",
370373
"multipart-write-binary",
371374
"read-binary-files",
@@ -397,6 +400,7 @@ class NativeCliRuntimeIT extends AnyFunSpec
397400
Array("update-op") ++
398401
// Take too long time
399402
Array("array-concat") ++
403+
Array("big_intersection") ++
400404
Array("sql_date_mapping") ++
401405
Array("runtime_run")
402406

@@ -426,12 +430,17 @@ class NativeCliRuntimeIT extends AnyFunSpec
426430
Array("as-operator",
427431
"type-equality"
428432
) ++
429-
Array("xml_doctype", "stringutils_unwrap")
433+
Array("xml_doctype", "stringutils_unwrap", "weave_ast_module")
430434
} else if (versionString == "2.5") {
431435
baseArray ++
432436
Array("xml_doctype", "stringutils_unwrap")
433-
}
434-
else {
437+
} else if (versionString == "2.6") {
438+
baseArray ++
439+
Array("weave_ast_module")
440+
} else if (versionString == "2.7") {
441+
baseArray ++
442+
Array("weave_ast_module")
443+
} else {
435444
baseArray
436445
}
437446
testToIgnore

native-cli-integration-tests/src/test/scala/org/mule/weave/native/NativeCliTest.scala

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,6 @@ class NativeCliTest extends AnyFreeSpec
2424
DEFAULT_DW_CLI_HOME.mkdirs()
2525
}
2626

27-
"it should execute simple migration correctly" in {
28-
val stream: URL = getClass.getClassLoader.getResource("dw1/SimpleFile.dw1")
29-
val file = new File(stream.toURI)
30-
val (_, output, _) = NativeCliITTestRunner(Array("migrate", file.getAbsolutePath)).execute()
31-
output.trim shouldBe
32-
"""
33-
|%dw 2.0
34-
|var arr = ["foo"]
35-
|---
36-
|{
37-
| a: [0, 1, 2] contains [1, 2],
38-
| b: sum(1 to 1000),
39-
| c: sizeOf(("123"))
40-
|}
41-
|""".stripMargin.trim
42-
}
43-
4427
"it should execute simple case correctly" in {
4528
val (_, output, _) = NativeCliITTestRunner(Array("run", "1 to 10")).execute()
4629
output shouldBe "[\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10\n]"

native-cli/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ dependencies {
3030
implementation group: 'org.mule.weave', name: 'xmlschema-module', version: weaveVersion
3131
implementation group: 'org.mule.weave', name: 'http-module', version: ioVersion
3232
implementation group: 'org.mule.weave', name: 'process-module', version: ioVersion
33-
implementation group: 'org.mule.weave', name: 'migrant', version: '2.6.0-SNAPSHOT'
3433
implementation(group: 'org.mule.weave', name: 'http-netty-module', version: ioVersion) {
3534
exclude group: 'org.slf4j'
3635
}
@@ -64,7 +63,6 @@ task genVersions() {
6463
outputPrinter.println("object ComponentVersion {")
6564
outputPrinter.println("\tval weaveVersion = \"" + weaveVersion + "\"")
6665
outputPrinter.println("\tval nativeVersion = \"" + nativeVersion + "\"")
67-
outputPrinter.println("\tval weaveSuiteVersion = \"" + weaveTestSuiteVersion + "\"")
6866
outputPrinter.println("}")
6967
outputPrinter.close()
7068
}

native-cli/src/main/java/org/mule/weave/cli/DWCLI.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import org.mule.weave.cli.pico.PicoRepl;
88
import org.mule.weave.cli.pico.PicoRunScript;
99
import org.mule.weave.cli.pico.PicoRunSpell;
10-
import org.mule.weave.cli.pico.PicoMigrate;
1110
import org.mule.weave.cli.pico.PicoUpdateSpells;
1211
import org.mule.weave.cli.pico.PicoValidateScript;
1312
import org.mule.weave.cli.pico.PicoVersionProvider;
@@ -48,7 +47,6 @@ public void run(String[] args, Console console) {
4847
PicoRunScript.class,
4948
PicoWizard.class,
5049
PicoValidateScript.class,
51-
PicoMigrate.class,
5250
PicoRunSpell.class,
5351
CommandLine.HelpCommand.class,
5452
PicoRepl.class

native-cli/src/main/java/org/mule/weave/cli/pico/PicoMigrate.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

native-cli/src/main/scala/org/mule/weave/dwnative/cli/commands/MigrateDW1Command.scala

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)