From 567a980a035bb52e5d728a1f8ef77a05108a66cb Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Wed, 18 Feb 2026 15:12:12 -0500 Subject: [PATCH] Give error details of sliced jobs if they error in live tests (#16273) --- awx/main/tests/live/tests/conftest.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/awx/main/tests/live/tests/conftest.py b/awx/main/tests/live/tests/conftest.py index b74a997c8e..4667dc09f1 100644 --- a/awx/main/tests/live/tests/conftest.py +++ b/awx/main/tests/live/tests/conftest.py @@ -18,7 +18,7 @@ from awx.main.tests.functional.conftest import * # noqa from awx.main.tests.conftest import load_all_credentials # noqa: F401; pylint: disable=unused-import from awx.main.tests import data -from awx.main.models import Project, JobTemplate, Organization, Inventory +from awx.main.models import Project, JobTemplate, Organization, Inventory, WorkflowJob, UnifiedJob from awx.main.tasks.system import clear_setting_cache logger = logging.getLogger(__name__) @@ -100,6 +100,21 @@ def wait_for_events(uj, timeout=2): def unified_job_stdout(uj): + if type(uj) is UnifiedJob: + uj = uj.get_real_instance() + if isinstance(uj, WorkflowJob): + outputs = [] + for node in uj.workflow_job_nodes.all().select_related('job').order_by('id'): + if node.job is None: + continue + outputs.append( + 'workflow node {node_id} job {job_id} output:\n{output}'.format( + node_id=node.id, + job_id=node.job.id, + output=unified_job_stdout(node.job), + ) + ) + return '\n'.join(outputs) wait_for_events(uj) return '\n'.join([event.stdout for event in uj.get_event_queryset().order_by('created')])