common-workflow-language / common-workflow-language/cwltool

Resolving dependencies using Environment Modules fails with galaxy-lib prior to 17.09.9

Open
#983 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

Issue to track PR #982, which adds a test and bumps the minimum version of galaxy-lib.

## Expected Behavior
Resolving software dependencies using [Environment Modules](
http://modules.sourceforge.net/) should work when the minimum package versions in `setup.py` are respected.

## Actual Behavior
Using any version prior to galaxy-lib 17.09.9 fails, see trace below.
The bug in `resolver_msg` that throws the exception was fixed in [galaxyproject/galaxy@ 69a8700](https://github.com/galaxyproject/galaxy/commit/69a87003f70e3925554fcc88fd2080edab619ed1).

## Workflow Code
```
cwltool \
--beta-dependency-resolvers-configuration tests/test_deps_env_modules_resolvers_conf.yml \
tests/random_lines_modules.cwl tests/random_lines_job.json
```
with *test_deps_env_modules_resolvers_conf.yml* containing
```
- type: modules
```

## Full Traceback
```pytb
E Exception while running job
E Traceback (most recent call last):
E File "cwltool/job.py", line 293, in _execute
E job_script_contents = builder.build_job_script(commands)
E File "cwltool/builder.py", line 172, in build_job_script
E return build_job_script_method(self, commands)
E File "cwltool/software_requirements.py", line 75, in build_job_script
E dependencies, job_directory=builder.tmpdir))
E File "/work/cwltool/venv/lib/python2.7/site-packages/galaxy/tools/deps/__init__.py", line 111, in dependency_shell_commands
E requirement_to_dependency = self.requirements_to_dependencies(requirements, **kwds)
E File "/work/cwltool/venv/lib/python2.7/site-packages/galaxy/tools/deps/__init__.py", line 120, in requirements_to_dependencies
E requirement_to_dependency = self._requirements_to_dependencies_dict(requirements, **kwds)
E File "/work/cwltool/venv/lib/python2.7/site-packages/galaxy/tools/deps/__init__.py", line 168, in _requirements_to_dependencies_dict
E log.debug(dependency.resolver_msg)
E File "/work/cwltool/venv/lib/python2.7/site-packages/galaxy/tools/deps/resolvers/__init__.py", line 258, in resolver_msg
E return "Using dependency %s version %s of type %s" % (self.name, self.version, self.dependency_type)
E AttributeError: 'ModuleDependency' object has no attribute 'name'
E [job random_lines.cwl] completed permanentFail
E [job random_lines.cwl] {}
E [job random_lines.cwl] Removing input staging directory /private/var/folders/6h/ylknw0r92sx4_dyvz6x7tp7c0000gp/T/tmpIfZVcO
E [job random_lines.cwl] Removing temporary directory /private/var/folders/6h/ylknw0r92sx4_dyvz6x7tp7c0000gp/T/tmpWSEOzE
E Final process status is permanentFail
```

## Your Environment
* cwltool version: 1.0.20181119224533

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.