Skip to content

Commit 4eaaed2

Browse files
committed
CORE-1889 Update Tapis v2 to v3 app migration guide
Updated `Outputs` section for non Docker runtime apps. Updated the `jq` migration helper command `execSystemId` and `maxMinutes` values.
1 parent c3dadd0 commit 4eaaed2

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

docs/services/api/tapis-v2-v3-migration.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ detailed in the following sections.
542542

543543
If an input value is also required as a parameter on the command line,
544544
then the `name` of the input in the `fileInputs` parameter field
545-
should match the `name` of the corresponding `appArgs` parameter.
545+
should match the `name` of the corresponding `appArgs` parameter (or the `key` of the corresponding `envVariables` parameter).
546546

547547
If the app's `runtime` value is `DOCKER`,
548548
then the DE will automatically prepend `/TapisInput/`
@@ -559,14 +559,15 @@ then the DE requires an app output to be defined so that it can be used as an
559559
app's input in a subsequent step in the workflow.
560560
If the output value is also required as a parameter on the command line,
561561
then the `name` of the output in the `notes` field should match the `name` of the
562-
corresponding `appArgs` parameter.
562+
corresponding `appArgs` parameter (or the `key` of the corresponding `envVariables` parameter).
563563

564564
If the app's `runtime` value is `DOCKER`,
565565
then the DE will automatically prepend `/TapisOutput/`
566566
to the parameter value submitted by the user,
567567
since that is the directory mounted inside the container by Tapis for outputs.
568-
Otherwise only the base name of the file or folder will be submitted
569-
for the command line argument.
568+
Otherwise the DE will automatically prepend `output/`
569+
to the parameter value submitted by the user,
570+
since that is the directory created by Tapis for outputs.
570571

571572
#### Flags or Booleans
572573

@@ -612,7 +613,7 @@ but it can at least help with some tedious tasks,
612613
such as copying v2 fields used by the DE into v3 `notes` fields.
613614

614615
```
615-
jq 'def params: . | {"name": .id, "arg": ((.details.argument // .value.default) | tostring), "description": .details.description, "inputMode": (.value.required | if . then "REQUIRED" else "INCLUDE_ON_DEMAND" end), "notes": .} | if (.description | length) > 0 then . else del(.description) end; {id, version, "description": .longDescription, "runtime": "ZIP", "containerImage": "tapis://\(.deploymentSystem)\(.deploymentPath)", "jobType": "BATCH", tags, "jobAttributes":{"execSystemId": "cyverse-qacondor1-qa-test3", "parameterSet": {"appArgs": [.parameters[] | params]}, "fileInputs": [.inputs[] | params | {"targetPath": "*"} + .]}, "notes": {name, "label": .label, owner, shortDescription, longDescription, helpURI, ontology, executionType, executionSystem, deploymentPath, deploymentSystem, templatePath, testPath, modules, outputs}}' v2_app.json
616+
jq 'def params: . | {"name": .id, "arg": ((.details.argument // .value.default) | tostring), "description": .details.description, "inputMode": (.value.required | if . then "REQUIRED" else "INCLUDE_ON_DEMAND" end), "notes": .} | if (.description | length) > 0 then . else del(.description) end; {id, version, "description": .longDescription, "runtime": "ZIP", "containerImage": "tapis://\(.deploymentSystem)\(.deploymentPath)", "jobType": "BATCH", tags, "jobAttributes":{"execSystemId": "stampede3", "maxMinutes": 1440, "parameterSet": {"appArgs": [.parameters[] | params]}, "fileInputs": [.inputs[] | params | {"targetPath": "*"} + .]}, "notes": {name, "label": .label, owner, shortDescription, longDescription, helpURI, ontology, executionType, executionSystem, deploymentPath, deploymentSystem, templatePath, testPath, modules, outputs}}' v2_app.json
616617
```
617618

618619
Note that Tapis no longer automatically passes job parameters to the template wrapper script as environment variables by the parameter ID,
@@ -638,7 +639,7 @@ then use the following `jq` command, which will populate the v3 app's `envVariab
638639
instead of the `appArgs` parameter array:
639640

640641
```
641-
jq 'def params: . | {"name": .id, "arg": ((.details.argument // .value.default) | tostring), "description": .details.description, "inputMode": (.value.required | if . then "REQUIRED" else "INCLUDE_ON_DEMAND" end), "notes": .} | if (.description | length) > 0 then . else del(.description) end; {id, version, "description": .longDescription, "runtime": "ZIP", "containerImage": "tapis://\(.deploymentSystem)\(.deploymentPath)", "jobType": "BATCH", tags, "jobAttributes":{"execSystemId": "cyverse-qacondor1-qa-test3", "parameterSet": {"envVariables": ([.parameters[] | params] | map(.key = .name | .value = .arg | del(.name, .arg)))}, "fileInputs": [.inputs[] | params | {"targetPath": "*"} + .]}, "notes": {name, "label": .label, owner, shortDescription, longDescription, helpURI, ontology, executionType, executionSystem, deploymentPath, deploymentSystem, templatePath, testPath, modules, outputs}}' v2_app.json
642+
jq 'def params: . | {"name": .id, "arg": ((.details.argument // .value.default) | tostring), "description": .details.description, "inputMode": (.value.required | if . then "REQUIRED" else "INCLUDE_ON_DEMAND" end), "notes": .} | if (.description | length) > 0 then . else del(.description) end; {id, version, "description": .longDescription, "runtime": "ZIP", "containerImage": "tapis://\(.deploymentSystem)\(.deploymentPath)", "jobType": "BATCH", tags, "jobAttributes":{"execSystemId": "stampede3", "maxMinutes": 1440, "parameterSet": {"envVariables": ([.parameters[] | params] | map(.key = .name | .value = .arg | del(.name, .arg)))}, "fileInputs": [.inputs[] | params | {"targetPath": "*"} + .]}, "notes": {name, "label": .label, owner, shortDescription, longDescription, helpURI, ontology, executionType, executionSystem, deploymentPath, deploymentSystem, templatePath, testPath, modules, outputs}}' v2_app.json
642643
```
643644

644645
The DE will process and display `envVariables` fields the same way that

0 commit comments

Comments
 (0)