Bug #15241

[a-c-r] crashing using collection in writable initialWorkDir

Added by Peter Amstutz 5 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-
Release relationship:
Auto

Description

  - class: InitialWorkDirRequirement
    listing:
      - entry: $(inputs.geneBankFilesDir)
        writable: true
    "keep:e4b03abaf2b9912f3823d19bd78f296b+219": [
        "keep:e4b03abaf2b9912f3823d19bd78f296b+219", 
        "/var/spool/cwl/e4b03abaf2b9912f3823d19bd78f296b+219", 
        "WritableDirectory", 
        false
    ], 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/arvados_cwl/executor.py", line 700, in arv_executor
    self.start_run(runnable, runtimeContext)
  File "/usr/lib/python2.7/site-packages/arvados_cwl/executor.py", line 219, in start_run
    self.workflow_eval_lock, self.stop_polling)
  File "/usr/lib/python2.7/site-packages/arvados_cwl/task_queue.py", line 44, in add
    task()
  File "/usr/lib/python2.7/site-packages/arvados_cwl/arvcontainer.py", line 152, in run
    vwd.copy(path, p.target, source_collection=source)
  File "/usr/lib/python2.7/site-packages/arvados/arvfile.py", line 472, in must_be_writable_wrapper
    return orig_func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/arvados/arvfile.py", line 273, in synchronized_wrapper
    return orig_func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/arvados/collection.py", line 923, in copy
    target_dir.add(source_obj, target_name, overwrite, False)
  File "/usr/lib/python2.7/site-packages/arvados/arvfile.py", line 472, in must_be_writable_wrapper
    return orig_func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/arvados/arvfile.py", line 273, in synchronized_wrapper
    return orig_func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/arvados/collection.py", line 849, in add
    item = source_obj.clone(self, target_name)
AttributeError: 'NoneType' object has no attribute 'clone'

The problem is that get_collection() returns None for path when there is no path in the keep: URI. The None gets passed into vwd.copy() and causes it to crash.

It should probably be changed to path or "." so that it refers to the whole collection in that case.

Write a test case to confirm the bug & the fix.

Associated revisions

Revision c0319561
Added by Peter Amstutz 5 months ago

Merge branch '15241-collection-input' refs #15241

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

Revision 0559157e (diff)
Added by Peter Amstutz 5 months ago

Fix cwl tests refs #15241

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Peter Amstutz 5 months ago

  • Status changed from New to In Progress

#2 Updated by Peter Amstutz 5 months ago

  • Subject changed from [a-c-r] crashing using writable collection in initialWorkDir to [a-c-r] crashing using collection in writable initialWorkDir

#3 Updated by Peter Amstutz 5 months ago

  • Description updated (diff)

#4 Updated by Peter Amstutz 5 months ago

  • Status changed from In Progress to Resolved

#5 Updated by Tom Morris 5 months ago

  • Release set to 15

Also available in: Atom PDF