diff --git a/pungi/phases/image_container.py b/pungi/phases/image_container.py index f7139263..9ff30273 100644 --- a/pungi/phases/image_container.py +++ b/pungi/phases/image_container.py @@ -76,7 +76,7 @@ class ImageContainerThread(WorkerThread): ) if koji.watch_task(task_id, log_file) != 0: raise RuntimeError( - "ImageContainer: task %s failed: see %s for details" + "ImageContainer task failed: %s. See %s for details" % (task_id, log_file) ) diff --git a/pungi/phases/kiwibuild.py b/pungi/phases/kiwibuild.py index 328a8bb3..2c06b3f1 100644 --- a/pungi/phases/kiwibuild.py +++ b/pungi/phases/kiwibuild.py @@ -148,7 +148,7 @@ class RunKiwiBuildThread(WorkerThread): ) if koji.watch_task(task_id, log_file) != 0: raise RuntimeError( - "kiwiBuild: task %s failed: see %s for details" % (task_id, log_file) + "kiwiBuild task failed: %s. See %s for details" % (task_id, log_file) ) # Refresh koji session which may have timed out while the task was diff --git a/pungi/phases/osbs.py b/pungi/phases/osbs.py index e5ddcb60..c6a337b0 100644 --- a/pungi/phases/osbs.py +++ b/pungi/phases/osbs.py @@ -134,7 +134,7 @@ class OSBSThread(WorkerThread): # though there is not much there). if koji.watch_task(task_id, log_file) != 0: raise RuntimeError( - "OSBS: task %s failed: see %s for details" % (task_id, log_file) + "OSBS task failed: %s. See %s for details" % (task_id, log_file) ) scratch = config.get("scratch", False) diff --git a/pungi/phases/osbuild.py b/pungi/phases/osbuild.py index 35d3318f..6c5b7e5a 100644 --- a/pungi/phases/osbuild.py +++ b/pungi/phases/osbuild.py @@ -185,7 +185,7 @@ class RunOSBuildThread(WorkerThread): ) if koji.watch_task(task_id, log_file) != 0: raise RuntimeError( - "OSBuild: task %s failed: see %s for details" % (task_id, log_file) + "OSBuild task failed: %s. See %s for details" % (task_id, log_file) ) # Refresh koji session which may have timed out while the task was diff --git a/tests/test_image_container_phase.py b/tests/test_image_container_phase.py index a467ef7c..f4e23cad 100644 --- a/tests/test_image_container_phase.py +++ b/tests/test_image_container_phase.py @@ -230,7 +230,7 @@ class ImageContainerThreadTest(helpers.PungiTestCase): (self.compose, self.compose.variants["Server"], self.cfg.copy()), 1 ) - self.assertRegex(str(ctx.exception), r"task 12345 failed: see .+ for details") + self.assertRegex(str(ctx.exception), r"task failed: 12345. See .+ for details") self.assertRepoFile() self.assertKojiCalls(self.cfg) self.assertEqual(add_metadata.call_args_list, []) diff --git a/tests/test_osbs_phase.py b/tests/test_osbs_phase.py index 12847d7d..369adc8d 100644 --- a/tests/test_osbs_phase.py +++ b/tests/test_osbs_phase.py @@ -579,7 +579,7 @@ class OSBSThreadTest(helpers.PungiTestCase): with self.assertRaises(RuntimeError) as ctx: self.t.process((self.compose, self.compose.variants["Server"], cfg), 1) - self.assertRegex(str(ctx.exception), r"task 12345 failed: see .+ for details") + self.assertRegex(str(ctx.exception), r"task failed: 12345. See .+ for details") @mock.patch("pungi.phases.osbs.get_file_from_scm") @mock.patch("pungi.phases.osbs.kojiwrapper.KojiWrapper")