From 274e487a964969996dfba080c37375ce666e8ec0 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Tue, 24 Aug 2021 10:33:00 -0400 Subject: [PATCH] Attempt to surface streaming errors that were being eaten (#10918) --- awx/main/tasks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index c577a426e8..fa65f97f40 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -3078,7 +3078,13 @@ class AWXReceptorJob: return res if not self.task.instance.result_traceback: - raise RuntimeError(detail) + try: + resultsock = receptor_ctl.get_work_results(self.unit_id, return_sockfile=True) + lines = resultsock.readlines() + self.task.instance.result_traceback = b"".join(lines).decode() + self.task.instance.save(update_fields=['result_traceback']) + except Exception: + raise RuntimeError(detail) return res