We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code block, starting at line 501, checks for a non-empty stderr, else it assumes task failure:
stderr
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.
Issue a warning message inside any task that uses the SSHExecutor.
The task should be marked as failed only if the returncode is non-zero - as opposed to assuming this if stderr is not empty.
returncode
Log the message all the same, but check the returncode before deferring to _on_ssh_fail:
_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)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Environment
What is happening?
The following code block, starting at line 501, checks for a non-empty
stderr
, else it assumes task failure: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
:The text was updated successfully, but these errors were encountered: