Project

General

Profile

Actions

Bug #15241

closed

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

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

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
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.

Actions

Also available in: Atom PDF