Project

General

Profile

Actions

Bug #17595

closed

Selecting multiple collections as inputs to a workflow

Added by Peter Amstutz almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-

Files

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 1 (0 open1 closed)

Task #17636: Review 17595-Selecting-multiple-collections-as-inputs-to-a-workflowResolvedDaniel Kutyła05/10/2021Actions

Related issues

Blocks Arvados - Idea #17512: Release Arvados 2.2ResolvedPeter Amstutz05/03/2021Actions
Actions #1

Updated by Peter Amstutz almost 3 years ago

  • Assigned To set to Daniel Kutyła
Actions #2

Updated by Daniel Kutyła almost 3 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Peter Amstutz almost 3 years ago

Actions #4

Updated by Daniel Kutyła almost 3 years 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

Actions #5

Updated by Peter Amstutz almost 3 years 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.

Actions #6

Updated by Peter Amstutz almost 3 years ago

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

Updated by Daniel Kutyła almost 3 years 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

Actions #8

Updated by Peter Amstutz almost 3 years 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}"

Actions #9

Updated by Peter Amstutz almost 3 years ago

  • Release set to 38
Actions #10

Updated by Daniel Kutyła almost 3 years 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

Actions #11

Updated by Peter Amstutz almost 3 years 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
Actions #12

Updated by Daniel Kutyła almost 3 years ago

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

Also available in: Atom PDF