Raise in JobQueueCluster._call when command returns with non zero exit code#146
Conversation
|
In general I really like the improved error messages.
No objection from me |
guillaumeeb
left a comment
There was a problem hiding this comment.
Thanks for this improved message, a few comments linked to LSF.
dask_jobqueue/core.py
Outdated
| A list of commands, each of which is a list of strings to hand to subprocess.communicate | ||
| cmd: List(str)) | ||
| A command, each of which is a list of strings to hand to | ||
| subprocess.communicate |
dask_jobqueue/core.py
Outdated
|
|
||
| def _calls(self, cmds, **kwargs): | ||
| """ Call a command using subprocess.communicate | ||
| def _call(self, cmd): |
There was a problem hiding this comment.
You should keep **kwargs attribute for LSF specificities.
dask_jobqueue/core.py
Outdated
|
|
||
| proc = subprocess.Popen(cmd, | ||
| stdout=subprocess.PIPE, | ||
| stderr=subprocess.PIPE) |
There was a problem hiding this comment.
Add **kwargs here, see previous comment.
|
@lesteve, looks like you've been busy with other things lately. Do you plan on getting back to dask-jobqueue (this would be quite welcomed 😀 )? Or should we take over your ongoing work? |
|
Indeed I have been busy with other things lately, sorry about that ... Looks like there are non-trivial merge conflicts in this PR, I'll try to revive it. This will very likely not happen this week but I'll try my best for next week. |
So I've done the merge and corrected my remark, one final look from you @lesteve would be good. |
|
Thanks a lot for this! There was still a merge conflict for some reason, so I merged upstream/master and pushed a new commit. |
|
Thanks @lesteve. |
Fix #142.
Here is the same snippet as in #142:
Error on master
Error with this PR
A few remarks:
JobQueueCluster._callswhich calls multiple commands since we are only calling one command at a time. Maybe @mrocklin remembers why there was_calls/_call(maybe this is related to the comment "and an opportunity to go asynchronous in the future." that I don't fully understand if I am honest)..decode()for stdout and stderr to have better error messages. If anyone sees a reason why that could be problematic, let me know. Note: on Python 3,subprocess.Popen+communicatereturns bytes and not str.