Skip to content

Commit

Permalink
CORE-1889 Update Tapis v2 to v3 app migration guide
Browse files Browse the repository at this point in the history
Added `jq` migration helper docs.
  • Loading branch information
psarando committed Jul 17, 2024
1 parent 93f27dc commit 8fcf392
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/services/api/tapis-v2-v3-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,3 +593,17 @@ determine if the user's input should be restricted to integers or decimal values

See https://github.com/cyverse-de/mescal/blob/main/src/mescal/agave_de_v2/params.clj
for a list of supported number XSD types (otherwise defaulting to decimal values).

## Migration helper `jq`

The following `jq` command can be used to bootstrap a migration from a v2 app into a v3 format.
It's not exhaustive, so some manual editing of the output will be required,
particularly for the `execSystemId`, `containerImage`, and `enumeration` type parameter fields;
but it can at least help with some tedious tasks,
such as copying v2 fields used by the DE into v3 `notes` fields.

jq 'def params: . | {"name": .id, "arg": .details.argument, "description": .details.description, "inputMode": (.value.required | if . then "REQUIRED" else "INCLUDE_ON_DEMAND" end), "notes": .} | if (.arg | length) > 0 then . else del(.arg) end | if (.description | length) > 0 then . else del(.description) end; {id, version, "description": .longDescription, "runtime": "ZIP", "containerImage": "tapis://\(.deploymentSystem)\(.deploymentPath)", "jobType": "FORK", 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

With the help of this guide and the
[Tapis v3 docs](https://tapis.readthedocs.io/en/latest/technical/apps.html),
hopefully the migration will not be too difficult.

0 comments on commit 8fcf392

Please sign in to comment.