generated from AgnostiqHQ/covalent-executor-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Environment
- Covalent version: 0.216.0rc0
- Covalent-SSH plugin version: 0.20.0
- Python version: 3.8.15
- Operating system: MacOS (Darwin Kernel Version 21.6.0)
What is happening?
The following code block, starting at line 501, checks for a non-empty stderr, else it assumes task failure:
if result_err := result.stderr.strip():
app_log.warning(result_err)
return self._on_ssh_fail(function, args, kwargs, result_err)However, it does not distinguish warnings from errors. Warning messages will therefore result in a "failed" task.
How can we reproduce the issue?
Issue a warning message inside any task that uses the SSHExecutor.
What should happen?
The task should be marked as failed only if the returncode is non-zero - as opposed to assuming this if stderr is not empty.
Any suggestions?
Log the message all the same, but check the returncode before deferring to _on_ssh_fail:
if result_err := result.stderr.strip():
app_log.warning(result_err)
if result.returncode != 0:
return self._on_ssh_fail(function, args, kwargs, result_err)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels