summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/remote/test_remote_zuul_stream.py4
-rw-r--r--zuul/ansible/base/callback/zuul_stream.py16
2 files changed, 13 insertions, 7 deletions
diff --git a/tests/remote/test_remote_zuul_stream.py b/tests/remote/test_remote_zuul_stream.py
index c163b3488..03247b9ce 100644
--- a/tests/remote/test_remote_zuul_stream.py
+++ b/tests/remote/test_remote_zuul_stream.py
@@ -139,9 +139,7 @@ class FunctionalZuulStreamMixIn:
# Callback Exception:
# ...
#
- # NOTE(ianw) 2022-08-24 : needs a couple of fixes before
- # we can turn on.
- self.assertIn('[WARNING]: Failure using method', console_output)
+ self.assertNotIn('[WARNING]: Failure using method', console_output)
text = self._get_job_output(build)
self.assertLogLine(
diff --git a/zuul/ansible/base/callback/zuul_stream.py b/zuul/ansible/base/callback/zuul_stream.py
index f31983ed6..966d7d6fa 100644
--- a/zuul/ansible/base/callback/zuul_stream.py
+++ b/zuul/ansible/base/callback/zuul_stream.py
@@ -535,10 +535,18 @@ class CallbackModule(default.CallbackModule):
elif result_dict.get('msg') == 'All items completed':
self._log_message(result, result_dict['msg'])
else:
- self._log_message(
- result,
- "Runtime: {delta}".format(
- **result_dict))
+ if 'delta' in result_dict:
+ self._log_message(
+ result,
+ "Runtime: {delta}".format(
+ **result_dict))
+ else:
+ # NOTE(ianw) 2022-08-24 : *Fairly* sure that you only
+ # fall into here when the call actually fails (and has
+ # not start/end time), but it is ignored by
+ # failed_when matching.
+ self._log_message(result, msg='ERROR (ignored)',
+ result_dict=result_dict)
def v2_runner_item_on_ok(self, result):
result_dict = dict(result._result)