Project

General

Profile

Actions

Bug #10308

closed

Output glob "./" doesn't work as output from CWL workflow

Added by michael kotliar over 7 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Crunch
Story points:
-

Description

Hello! Found a problem while trying return directory from cwl. Tested the following cwl on both cwl-runner and arvados-cwl-runner. According to documentation both support cwl v1.0. On cwl-runner all works fine: receive file according to the parameter set in $(inputs.fileName).
When trying to run the same cwl with arvados-cwl-runner get an error:
WorkflowException: Error collecting output for parameter 'dir': Did not find output file with glob pattern: '['./']'

Example that I tested

task.cwl

cwlVersion: v1.0
class: CommandLineTool
hints:
  DockerRequirement:
    dockerPull: ubuntu
baseCommand: echo
arguments: ["return dir"]
requirements:
  InitialWorkDirRequirement:
    listing:
      - entryname: $(inputs.fileName)
        entry: Some text inside the file

inputs:
  fileName:
    type: string

outputs:
  dir:
    type: Directory
    outputBinding:
      glob: "./" 

job.yml
fileName: textfile.txt


Subtasks 1 (0 open1 closed)

Task #17558: Review 17521-dot-slash-globResolvedPeter Amstutz10/20/2016Actions

Related issues

Related to Arvados - Bug #17521: Handling of ./ in arvados-cwl-runnerResolvedPeter AmstutzActions
Actions #1

Updated by michael kotliar over 7 years ago

Works fine with

glob: "." 

Actions #2

Updated by Tom Morris over 7 years ago

  • Subject changed from Set glob to return Directory as output form cwl workflow to Output glob "./" doesn't work as output from CWL workflow
  • Target version set to Arvados Future Sprints

Since both forms ("./" and ".") are equivalent, it seems like they should both be supported.

Actions #3

Updated by Peter Amstutz about 3 years ago

  • Target version changed from Arvados Future Sprints to 2021-04-28 bughunt sprint
Actions #4

Updated by Peter Amstutz almost 3 years ago

17521-dot-slash-glob @ 60b22bcd41053a641c8157367a1589287f706674

Fixes both #17521 and #10380

Cleans up the path, removing leading ./, trailing slashes, redundant '.' and blank path segments, and other stuff that potentially confuses the path matching. Adds two integration tests based on bug reports, the fix should fix both of them.

developer-run-tests: #2438

Actions #5

Updated by Peter Amstutz almost 3 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Peter Amstutz almost 3 years ago

  • Related to Bug #17521: Handling of ./ in arvados-cwl-runner added
Actions #7

Updated by Lucas Di Pentima almost 3 years ago

Just one question:

  • Shouldn't normpath() be used also at fsaccess.py line 106?

The rest LGTM, thanks.

Actions #8

Updated by Peter Amstutz almost 3 years ago

Lucas Di Pentima wrote:

Just one question:

  • Shouldn't normpath() be used also at fsaccess.py line 106?

I did a quick scan through, it doesn't seem like there are any places where it actually uses "rest" when "collection" is None.

The rest LGTM, thanks.

I will merge.

Actions #9

Updated by Peter Amstutz almost 3 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF