Bug #17595

Selecting multiple collections as inputs to a workflow

Added by Peter Amstutz about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Start date:
05/10/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-

duplicated-selections.png (158 KB) duplicated-selections.png Peter Amstutz, 05/10/2021 07:37 PM
Untitled.jpg (81 KB) Untitled.jpg Daniel Kutyła, 05/12/2021 04:35 PM

Subtasks

Task #17636: Review 17595-Selecting-multiple-collections-as-inputs-to-a-workflowResolvedDaniel Kutyła


Related issues

Blocks Arvados - Story #17512: Release Arvados 2.2Resolved05/03/2021

Associated revisions

Revision 07bfbbb8
Added by Daniel Kutyła about 1 year ago

Merge branch '17595-Selecting-multiple-collections-as-inputs-to-a-workflow'
closes #17595

Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <>

History

#1 Updated by Peter Amstutz about 1 year ago

  • Assigned To set to Daniel Kutyła

#2 Updated by Daniel Kutyła about 1 year ago

  • Status changed from New to In Progress

#3 Updated by Peter Amstutz about 1 year ago

#4 Updated by Daniel Kutyła about 1 year ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/43c92c8e2518642fa1033d66a0f72fcb026c0308
Test run: developer-tests-workbench2: #399
Branch: 17595-Selecting-multiple-collections-as-inputs-to-a-workflow

Added multiselect, added tests

#5 Updated by Peter Amstutz about 1 year ago

You test cases are sort of complex. Here's the simplest possible test case:

cwlVersion: v1.2
class: Workflow
inputs:
  foo: File[]
  bar: Directory[]
outputs: []
steps: []

When I try this, I get a crash because the initial value for the "foo" and "bar" parameters is assigned "null" instead of an empty list. I tried to track down where the initial values are set, but didn't manage to find it.

I did notice that your test cases have "default" values for the arrays, which is probably why you didn't encounter this.

Here's the simplest test case, with defaults. This one doesn't crash.

cwlVersion: v1.2
class: Workflow
inputs:
  foo:
    type: File[]
    default: []
  bar:
    type: Directory[]
    default: []
outputs: []
steps: []

This is not exactly wrong, but the behavior is confusing:

There's only two collections in "Selected collections" but more than two collections are checked. I believe what is happening is that the duplicated selections have the same portable data hash as one of the selected collections. If you delete the collection from "Selected collections" it only clears the first checkbox, but not the duplicates.

For the checkboxes, it should do the comparison based on the uuid, not the portable data hash.

#6 Updated by Peter Amstutz about 1 year ago

  • Target version changed from 2021-05-12 sprint to 2021-05-26 sprint

#7 Updated by Daniel Kutyła about 1 year ago

Can you please verify if provided workflow is ok? As I do not see any inputs that allow me to test files and collections popups

#8 Updated by Peter Amstutz about 1 year ago

Daniel Kutyła wrote:

Can you please verify if provided workflow is ok? As I do not see any inputs that allow me to test files and collections popups

Ah, you are right. What I posted in #note-5 is the workflow that you would use with "arvados-cwl-runner --create-workflow" and not what actually appears in the workflow record. Here's the processed/encoded version:

"{\n \"$graph\": [\n {\n \"class\": \"Workflow\",\n \"cwlVersion\": \"v1.2\",\n \"hints\": [\n {\n \"acrContainerImage\": \"7009415fdc959d0c2819ee2e9db96561+261\",\n \"class\": \"http://arvados.org/cwl#WorkflowRunnerResources\"\n }\n ],\n \"id\": \"#main\",\n \"inputs\": [\n {\n \"default\": [],\n \"id\": \"#main/bar\",\n \"type\": {\n \"items\": \"Directory\",\n \"type\": \"array\"\n }\n },\n {\n \"default\": [],\n \"id\": \"#main/foo\",\n \"type\": {\n \"items\": \"File\",\n \"type\": \"array\"\n }\n }\n ],\n \"outputs\": [],\n \"steps\": []\n }\n ],\n \"cwlVersion\": \"v1.2\"\n}"

#9 Updated by Peter Amstutz about 1 year ago

  • Release set to 38

#10 Updated by Daniel Kutyła about 1 year ago

  • Release deleted (38)

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/1739b7bc6b6602cdfbaca0f5fe899c9e6fd7fe1f
Test run: developer-tests-workbench2: #636
Branch: 17595-Selecting-multiple-collections-as-inputs-to-a-workflow

Added multiselect, added tests

#11 Updated by Peter Amstutz about 1 year ago

You need a separate test with a version without default:

"$graph":
- class: Workflow
  cwlVersion: v1.2
  hints:
  - acrContainerImage: 7009415fdc959d0c2819ee2e9db96561+261
    class: http://arvados.org/cwl#WorkflowRunnerResources
  id: "#main" 
  inputs:
  - id: "#main/bar" 
    type:
      items: Directory
      type: array
  - id: "#main/foo" 
    type:
      items: File
      type: array
  outputs: []
  steps: []
cwlVersion: v1.2

#12 Updated by Daniel Kutyła about 1 year ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

Also available in: Atom PDF