galaxyproject / galaxyproject/galaxy

Cli runner fails cryptically when the executable for the scheduling system is not in the $PATH

Open
#8,906 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
1.2k
Avg merge
2d 16h
Merged PRs (30d)
169

Description

When using the cli plugin runners and the schedulers binary is not in the path, `cli.py` tends fails too cryptically:

```
galaxy.jobs.runners ERROR 2019-10-29 22:43:07,651 [p:20839,w:0,m:2] [ShellRunner.work_thread-0] (2) Unhandled exception calling queue_job
Traceback (most recent call last):
File "lib/galaxy/jobs/runners/__init__.py", line 131, in run_next
method(arg)
File "lib/galaxy/jobs/runners/cli.py", line 105, in queue_job
external_job_id = stdout.strip().split()[-1]
IndexError: list index out of range
```

Probably the cli runners should have a method to check and alert that the required executables are in the path and are executable within the shell where the galaxy process is running.

Contributor guide

Open the contributing guide

Research direction

Start with lib/galaxy/jobs/runners/cli.py, especially queue_job where the empty scheduler output becomes an IndexError. Reproduce the failure with the required executable absent from PATH, then inspect how CLI runners invoke scheduler commands. Done means a missing or non-executable scheduler is reported clearly instead of producing the cryptic traceback.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.