Skip to content

Commit 1049c4e

Browse files
authored
WX-1461 Remove womtool upgrade command (#7382)
1 parent 9d71ae2 commit 1049c4e

File tree

44 files changed

+50
-932
lines changed

Some content is hidden

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

44 files changed

+50
-932
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 87 Release Notes
44

5+
### `upgrade` command removed from Womtool
6+
7+
Womtool previously supported a `womtool upgrade` command for upgrading draft-2 WDLs to 1.0. With WDL 1.1 soon to become the latest supported version, this functionality is retiring.
8+
59
### Replacement of `gsutil` with `gcloud storage`
610

711
In this release, all **localization** functionality on the GCP backend migrates to use the more modern and performant `gcloud storage`. With sufficiently powerful worker VMs, Cromwell can now localize at up to 1200 MB/s [0][1][2].

centaur/src/it/scala/centaur/AbstractCentaurTestCaseSpec.scala

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -76,59 +76,6 @@ abstract class AbstractCentaurTestCaseSpec(cromwellBackends: List[String],
7676
runOrDont(testCase, tags, isIgnored, retries, runTestAndDeleteZippedImports())
7777
}
7878

79-
def executeWdlUpgradeTest(testCase: CentaurTestCase): Unit =
80-
executeStandardTest(wdlUpgradeTestWdl(testCase))
81-
82-
private def wdlUpgradeTestWdl(testCase: CentaurTestCase): CentaurTestCase = {
83-
import better.files.File
84-
import womtool.WomtoolMain
85-
86-
// The suffix matters because WomGraphMaker.getBundle() uses it to choose the language factory
87-
val rootWorkflowFile = File.newTemporaryFile(suffix = ".wdl").append(testCase.workflow.data.workflowContent.get)
88-
val workingDir = File.newTemporaryDirectory()
89-
val upgradedImportsDir = File.newTemporaryDirectory()
90-
val rootWorkflowFilepath = workingDir / rootWorkflowFile.name
91-
92-
// Un-upgraded imports go into the working directory
93-
testCase.workflow.data.zippedImports match {
94-
case Some(importsZip: File) =>
95-
importsZip.unzipTo(workingDir)
96-
case None => ()
97-
}
98-
99-
// Upgrade the imports and copy to main working dir (precludes transitive imports; no recursion yet)
100-
workingDir.list.toList.map { file: File =>
101-
val upgradedWdl = WomtoolMain.upgrade(file.pathAsString).stdout.get
102-
upgradedImportsDir.createChild(file.name).append(upgradedWdl)
103-
}
104-
105-
// Copy to working directory after we operate on the imports that are in it
106-
rootWorkflowFile.copyTo(rootWorkflowFilepath)
107-
108-
val upgradeResult = WomtoolMain.upgrade(rootWorkflowFilepath.pathAsString)
109-
110-
upgradeResult.stderr match {
111-
case Some(stderr) => println(stderr)
112-
case _ => ()
113-
}
114-
115-
val newCase = testCase.copy(
116-
workflow = testCase.workflow.copy(
117-
testName = testCase.workflow.testName + " (draft-2 to 1.0 upgrade)",
118-
data = testCase.workflow.data.copy(
119-
workflowContent = Option(upgradeResult.stdout.get), // this '.get' catches an error if upgrade fails
120-
zippedImports = Option(upgradedImportsDir.zip())
121-
)
122-
)
123-
)(cromwellTracker) // An empty zip appears to be completely harmless, so no special handling
124-
125-
rootWorkflowFile.delete(swallowIOExceptions = true)
126-
upgradedImportsDir.delete(swallowIOExceptions = true)
127-
workingDir.delete(swallowIOExceptions = true)
128-
129-
newCase
130-
}
131-
13279
private def runOrDont(testCase: CentaurTestCase,
13380
tags: List[Tag],
13481
ignore: Boolean,

centaur/src/it/scala/centaur/CentaurTestSuite.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ object CentaurTestSuite extends StrictLogging {
2828
logger.info(s"Cromwell under test configured with backends ${cromwellBackends.mkString(", ")}")
2929
logger.info(s"Unless overridden by workflow options file, tests use default backend: $defaultBackend")
3030

31-
def isWdlUpgradeTest(testCase: CentaurTestCase): Boolean = testCase.containsTag("wdl_upgrade")
32-
3331
def isEngineUpgradeTest(testCase: CentaurTestCase): Boolean = testCase.containsTag("engine_upgrade")
3432

3533
def isPapiUpgradeTest(testCase: CentaurTestCase): Boolean = testCase.containsTag("papi_upgrade")

centaur/src/it/scala/centaur/WdlUpgradeTestCaseSpec.scala

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

centaur/src/main/resources/standardTestCases/composedenginefunctions.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: composedenginefunctions
22
testFormat: workflowsuccess
3-
tags: ["wdl_upgrade"]
43

54
files {
65
workflow: composedenginefunctions/composedenginefunctions.wdl

centaur/src/main/resources/standardTestCases/conditionals.ifs_in_scatters.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ifs_in_scatters
22
testFormat: workflowsuccess
3-
tags: [ conditionals, "wdl_upgrade" ]
3+
tags: [ conditionals ]
44

55
files {
66
workflow: conditionals_tests/ifs_in_scatters/ifs_in_scatters.wdl

centaur/src/main/resources/standardTestCases/conditionals.nested_lookups.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nested_lookups
22
testFormat: workflowsuccess
3-
tags: [ conditionals, "wdl_upgrade" ]
3+
tags: [ conditionals ]
44

55
files {
66
workflow: conditionals_tests/nested_lookups/nested_lookups.wdl

centaur/src/main/resources/standardTestCases/conditionals.scatters_in_ifs.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: scatters_in_ifs
22
testFormat: workflowsuccess
3-
tags: [ conditionals, "wdl_upgrade" ]
3+
tags: [ conditionals ]
44

55
files {
66
workflow: conditionals_tests/scatters_in_ifs/scatters_in_ifs.wdl

centaur/src/main/resources/standardTestCases/conditionals.simple_if.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: simple_if
22
testFormat: workflowsuccess
3-
tags: [ conditionals, "wdl_upgrade" ]
3+
tags: [ conditionals ]
44

55
files {
66
workflow: conditionals_tests/simple_if/simple_if.wdl

centaur/src/main/resources/standardTestCases/conditionals.simple_if_workflow_outputs.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: simple_if_workflow_outputs
22
testFormat: workflowsuccess
3-
tags: [ conditionals, "wdl_upgrade" ]
3+
tags: [ conditionals ]
44

55
files {
66
workflow: conditionals_tests/simple_if_workflow_outputs/simple_if_workflow_outputs.wdl

0 commit comments

Comments
 (0)