Idea #9767
closed[Crunch2][Workbench] Extend pipeline template chooser to browse CWL workflows
Description
- In dashboard, when the "Run a pipeline" button is clicked, show pipeline_templates and workflows in the chooser popup.
- Do we want to rename this button as "Run a process"?
- When this button is pressed and a workflow is selected:
- Show the workflow details in the preview panel.
- When one of the workflows is selected and the "Select inputs" button is pressed: create a ContainerRequest with the data from the workflow and take the user to the container_request show page.
Updated by Tom Clegg over 8 years ago
- Subject changed from [Crunch2][Workbench] Extend pipeline template display to browse CWL workflows to [Crunch2][Workbench] Extend pipeline template chooser to browse CWL workflows
Updated by Tom Morris over 8 years ago
- Target version set to Arvados Future Sprints
Updated by Radhika Chippada over 8 years ago
- Description updated (diff)
- Is the workflow yaml from the selected Workflow object going to contain all the necessary information to fill in the required fields of a container_request, namely, command, container_image, output_path, and cwd?
- Also, what values should be used for the runtime_contraints of the newly created ContainerRequest?
- Do we need to expand the container_request schema to preserve / remember the selected Workflow uuid in the container_request?
- Do we need to expand the container_request show page to display a link to the Workflow (similar to a pipeline_instance display)?
Updated by Tom Morris over 8 years ago
- Target version changed from Arvados Future Sprints to 2016-08-31 sprint
Updated by Peter Amstutz over 8 years ago
The newly created container request should set up the following mounts:
"mounts": { "/var/lib/cwl/workflow.json": { "kind": "json", "content": {"class": "Workflow", ...}, }, "/var/lib/cwl/cwl.input.json": { "kind": "json", "content": {} }
(note: edited "/var/lib/cwl/jobs/cwl.input.json" -> "/var/lib/cwl/cwl.input.json")
Updated by Radhika Chippada over 8 years ago
- Assigned To set to Radhika Chippada
Updated by Peter Amstutz over 8 years ago
{ "command": ["arvados-cwl-runner", "--local", "--api=containers", "/var/lib/cwl/workflow.json", "/var/lib/cwl/cwl.input.json"], "output_path": "/var/spool/cwl", "cwd": "/var/spool/cwl", "priority": 1, "state": "Uncommitted", "container_image": "arvados/jobs", "mounts": { "/var/lib/cwl/workflow.json": { "kind": "json", "content": {"class": "Workflow", ...}, }, "/var/lib/cwl/cwl.input.json": { "kind": "json", "content": {} }, "stdout": { "kind": "file", "path": "/var/spool/cwl/cwl.output.json" }, "/var/spool/cwl": { "kind": "collection", "writable": True } }, "runtime_constraints": { "vcpus": 1, "ram": 256000000, "API": True } }
Updated by Peter Amstutz over 8 years ago
The above container request is based on the one already in use by arvados-cwl-runner --submit
so it should work.
Updated by Radhika Chippada over 8 years ago
- Status changed from New to In Progress
Updated by Radhika Chippada about 8 years ago
Please clarify the workflow.json mount point's content attribute. What key name should I use to pass the workflow json? Thanks.
"mounts": { "/var/lib/cwl/workflow.json": { "kind": "json", "content": {"class": "Workflow", ...}, },
Updated by Peter Amstutz about 8 years ago
Radhika Chippada wrote:
Please clarify the workflow.json mount point's content attribute. What key name should I use to pass the workflow json? Thanks.
The content of the "workflow" field from the "workflow" record should be assigned to the "content" field under "/var/lib/cwl/workflow.json".
Updated by Radhika Chippada about 8 years ago
Branch 9767-workflows-in-chooser is ready for review at c837f9d95
I manually added workflow yaml to 4xphq-7fd4e-2fkoj19vfnbc6j1, and created the container_request 4xphq-xvhdp-emh6t3cmt038ssa via the dashboard. (And I am able to see the inputs I added in the yaml in #9043 branch updates)
Updated by Peter Amstutz about 8 years ago
In work_units_controller.rb:51
wf_json = JSON.dump(YAML::load(workflow.workflow))
The mounts
field is a structured/serialized field, so this should be:
wf_json = YAML::load(workflow.workflow)
For the chooser title, instead of "Choose a pipeline or process to run" suggest this say "Choose a pipeline or workflow to run".
In the chooser, I'm not sure showing the raw text of the workflow is very useful. Perhaps remove the workflow text, and if there is no description, perhaps render "No description provided" so that the box isn't empty?
Updated by Tom Clegg about 8 years ago
Don't forget to add safe_yaml, if Workbench is parsing user-supplied YAML.
Updated by Peter Amstutz about 8 years ago
The container requests page should have a link back to the workflow object, similar to the way the pipeline instance page has a link to the pipeline template.
Suggest setting a default container request name based on the name of the workflow. Something like "%s container" or "%s run" (where %s = the workflow name).
Updated by Radhika Chippada about 8 years ago
wf_json = JSON.dump(YAML::load(workflow.workflow)) ... wf_json = YAML::load(workflow.workflow)
Updated
For the chooser title, instead of "Choose a pipeline or process to run" suggest this say "Choose a pipeline or workflow to run".
Done
In the chooser, I'm not sure showing the raw text of the workflow is very useful. Perhaps remove the workflow text, and if there is no description, perhaps render "No description provided" so that the box isn't empty?
Removed the workflow display from preview pane
Tom said: Don't forget to add safe_yaml, if Workbench is parsing user-supplied YAML.
Added safe_yaml gem and updated the load_config similar to API load_config
The container requests page should have a link back to the workflow object, similar to the way the pipeline instance page has a link to the pipeline template.
Will do this in a separate branch. Created task #9847
Suggest setting a default container request name based on the name of the workflow. Something like "%s container" or "%s run" (where %s = the workflow name).
Added this
Updated by Peter Amstutz about 8 years ago
The "Run a pipeline..." on project pages should also be updated to display workflows in the chooser dialog.
Updated by Radhika Chippada about 8 years ago
Good catch. Commit a485bcb2 addresses this. Thanks.
Updated by Radhika Chippada about 8 years ago
Branch 9767-workflow-link-in-container-request at ac36412 adds a link to workflow in the container_request#show page.
Updated by Peter Amstutz about 8 years ago
9767-workflow-link-in-container-request @ commit:a720aab7961883fe3541dc68ed7ad0d5f91edbee LGTM
Updated by Radhika Chippada about 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 67 to 100
Applied in changeset arvados|commit:a87fd176c3248699cbaaa45b815c8a34b3f5f11b.