Add support for multi deployment using workflow cwl#968
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #968 +/- ##
==========================================
+ Coverage 88.23% 88.38% +0.15%
==========================================
Files 88 88
Lines 20573 20808 +235
Branches 2702 2753 +51
==========================================
+ Hits 18152 18391 +239
+ Misses 1733 1729 -4
Partials 688 688 ☔ View full report in Codecov by Harness. |
fmigneault
left a comment
There was a problem hiding this comment.
Looks good for the features. We just need to document the things that were implemented.
There was a problem hiding this comment.
In order to properly reflect the added functionalities, the corresponding /rec, /per, /req and /conf elements defined in https://github.com/opengeospatial/ogcapi-processes/pull/588/changes#diff-6dbd783db0ade3c408ddc75d4271f2af2478056344e081a02f48a495fdde4716 need to be added to the weaver/wps_restapi/api.py conformance list.
The should use the ogcapi_proc_part2 prefix. To be placed where other similar definitions about ../cwl/.. can be found, in the corresponding order to make it easier to find/double-check them.
There was a problem hiding this comment.
I only see the /rec , is there something else to add ?
f"{ogcapi_proc_part2}/rec/deploy-replace-undeploy/deploy-body-cwl-multipart",
f"{ogcapi_proc_part2}/rec/deploy-replace-undeploy/replace-body-cwl-multipart
```",
There was a problem hiding this comment.
There was a problem hiding this comment.
I'm having issue understanding the changes / what needs to be taken from this pr
I see this new one
/per/cwl/multipart-cwl-body
and that deploy-body-cwl-multipart has been remove
There was a problem hiding this comment.
Yes. The 2 previous definitions have been combined into a single one (note the /rec -> /per change).
There was a problem hiding this comment.
So its only this to be added ?
/per/cwl/multipart-cwl-body
Since the other are regarding the w parameter
| assert resp.status_code == 400, \ | ||
| f"Expected 400 Bad Request for $graph without #main entry point, got {resp.status_code}: {resp.json}" |
There was a problem hiding this comment.
Can we have a few extra tests for error prone cases:
- With
#mainset on aCommandLineToolwhere more than oneCommandLineToolis provided and noWorkflowis present. - With
#mainset on aCommandLineToolwhileWorkflowhas something else. - With
#mainset on bothCommandLineToolandWorkflow.
In each case, those combination should create a similar error.
There was a problem hiding this comment.
When its a workflow there should always be a #main id ?, only in the case when using with graph right *
There was a problem hiding this comment.
If there is only 1 workflow, it is safe to assume it is the main if no #main is provided. It should be provided if there is more than one, and it must not be on a non workflow item. Should apply to any dict/graph/multipart variant when dealing with the list of resolved CWLs.
There was a problem hiding this comment.
We dont allow more than 1 workflow in this case
There was a problem hiding this comment.
We still need to check if there are more than one occurences of #main, such as for case (3) since the workflow > 1: raise condition will not be triggered.
fixes Support Multipart CWL Deployment #717
fixes Support multi-CWL file deployment #874
relates to CWL guidance improvements + Multipart Deploy/Replace opengeospatial/ogcapi-processes#588
Add support for multipart
Processdeployment usingmultipart/relatedormultipart/mixedcontent types,allowing simultaneous upload of multiple
CWLfiles (e.g.:class: Workflowandclass: CommandLineTool)along with optional
Processdescription metadataAdd support for
CWL$graphrepresentation with multiple entries, enabling deployment of workflows withembedded step definitions without manual preprocessing
(resolves Support embedded step definition in CWL #56).
Add validation during multipart deployment to ensure at least one
class: Workflowis present and properlyidentified as the main workflow from media-type hints or
Content-IDreferences.Add
CLIsupport for deploying multipleCWLfiles by repeating--cwlarguments to automatically generatemultipart/relatedrequest payloads, simplifying deployment of workflows with multiple step definitions.The
CLIaccepts a mixture of localCWLfile paths (asJSONorYAML) and remote URL references.The server handles
Content-Typemedia-type detection andContent-Locationheader processing for externalCWLfiles to fetch during deployment.