Report failed failable deliverables as errors
It does not abort the compose, but it's still an error. It should be marked as such in the log. This will allow easier searching for the failures. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
878eaeaaf6
commit
e3de4dcccf
@ -500,9 +500,9 @@ def log_failed_task(compose, variant, arch, deliverable, subvariant, logger=None
|
|||||||
ident = 'variant %s, arch %s' % (variant.uid if variant else 'None', arch)
|
ident = 'variant %s, arch %s' % (variant.uid if variant else 'None', arch)
|
||||||
if subvariant:
|
if subvariant:
|
||||||
ident += ', subvariant %s' % subvariant
|
ident += ', subvariant %s' % subvariant
|
||||||
logger.info('[FAIL] %s (%s) failed, but going on anyway.' % (msg, ident))
|
logger.error('[FAIL] %s (%s) failed, but going on anyway.' % (msg, ident))
|
||||||
if exc:
|
if exc:
|
||||||
logger.info(str(exc))
|
logger.error(str(exc))
|
||||||
tb = traceback.format_exc()
|
tb = traceback.format_exc()
|
||||||
logger.debug(tb)
|
logger.debug(tb)
|
||||||
|
|
||||||
|
@ -826,7 +826,7 @@ class BuildinstallThreadTestCase(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, 'x86_64', None, self.cmd), 0)
|
t.process((compose, 'x86_64', None, self.cmd), 0)
|
||||||
|
|
||||||
compose._logger.info.assert_has_calls([
|
compose._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Buildinstall (variant None, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Buildinstall (variant None, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('Runroot task failed: 1234. See %s/logs/x86_64/buildinstall.x86_64.log for more details.'
|
mock.call('Runroot task failed: 1234. See %s/logs/x86_64/buildinstall.x86_64.log for more details.'
|
||||||
% self.topdir)
|
% self.topdir)
|
||||||
@ -861,7 +861,7 @@ class BuildinstallThreadTestCase(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, 'x86_64', compose.variants['Server'], self.cmd), 0)
|
t.process((compose, 'x86_64', compose.variants['Server'], self.cmd), 0)
|
||||||
|
|
||||||
compose._logger.info.assert_has_calls([
|
compose._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Buildinstall (variant Server, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Buildinstall (variant Server, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('Runroot task failed: 1234. See %s/logs/x86_64/buildinstall-Server.x86_64.log for more details.' % self.topdir)
|
mock.call('Runroot task failed: 1234. See %s/logs/x86_64/buildinstall-Server.x86_64.log for more details.' % self.topdir)
|
||||||
])
|
])
|
||||||
|
@ -536,7 +536,7 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1)
|
t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('BOOM')
|
mock.call('BOOM')
|
||||||
])
|
])
|
||||||
@ -579,7 +579,7 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1)
|
t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('Runroot task failed: 1234. See %s for more details.'
|
mock.call('Runroot task failed: 1234. See %s for more details.'
|
||||||
% (self.topdir + '/logs/x86_64/createiso-image-name.x86_64.log'))
|
% (self.topdir + '/logs/x86_64/createiso-image-name.x86_64.log'))
|
||||||
@ -660,7 +660,7 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1)
|
t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('BOOM')
|
mock.call('BOOM')
|
||||||
])
|
])
|
||||||
|
@ -883,7 +883,7 @@ class TestCreateImageBuildThread(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, cmd), 1)
|
t.process((compose, cmd), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Image build (variant Client, arch *, subvariant Client) failed, but going on anyway.'),
|
mock.call('[FAIL] Image build (variant Client, arch *, subvariant Client) failed, but going on anyway.'),
|
||||||
mock.call('ImageBuild task failed: 1234. See %s for more details.'
|
mock.call('ImageBuild task failed: 1234. See %s for more details.'
|
||||||
% (os.path.join(self.topdir,
|
% (os.path.join(self.topdir,
|
||||||
@ -927,7 +927,7 @@ class TestCreateImageBuildThread(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, cmd), 1)
|
t.process((compose, cmd), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Image build (variant Client, arch *, subvariant Client) failed, but going on anyway.'),
|
mock.call('[FAIL] Image build (variant Client, arch *, subvariant Client) failed, but going on anyway.'),
|
||||||
mock.call('BOOM'),
|
mock.call('BOOM'),
|
||||||
])
|
])
|
||||||
|
@ -739,7 +739,7 @@ class TestCreateLiveImageThread(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, cmd, compose.variants['Client'], 'amd64'), 1)
|
t.process((compose, cmd, compose.variants['Client'], 'amd64'), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Live (variant Client, arch amd64, subvariant Client) failed, but going on anyway.'),
|
mock.call('[FAIL] Live (variant Client, arch amd64, subvariant Client) failed, but going on anyway.'),
|
||||||
mock.call('LiveImage task failed: 123. See %s/logs/amd64/liveimage-None-None-xyz.amd64.log for more details.'
|
mock.call('LiveImage task failed: 123. See %s/logs/amd64/liveimage-None-None-xyz.amd64.log for more details.'
|
||||||
% self.topdir)
|
% self.topdir)
|
||||||
@ -779,7 +779,7 @@ class TestCreateLiveImageThread(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, cmd, compose.variants['Client'], 'amd64'), 1)
|
t.process((compose, cmd, compose.variants['Client'], 'amd64'), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Live (variant Client, arch amd64, subvariant Client) failed, but going on anyway.'),
|
mock.call('[FAIL] Live (variant Client, arch amd64, subvariant Client) failed, but going on anyway.'),
|
||||||
mock.call('BOOM')
|
mock.call('BOOM')
|
||||||
])
|
])
|
||||||
|
@ -560,7 +560,7 @@ class TestLiveMediaThread(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, compose.variants['Server'], config), 1)
|
t.process((compose, compose.variants['Server'], config), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Live media (variant Server, arch *, subvariant KDE) failed, but going on anyway.'),
|
mock.call('[FAIL] Live media (variant Server, arch *, subvariant KDE) failed, but going on anyway.'),
|
||||||
mock.call('Live media task failed: 1234. See %s for more details.'
|
mock.call('Live media task failed: 1234. See %s for more details.'
|
||||||
% (os.path.join(self.topdir, 'logs/amd64-x86_64/livemedia-Server-KDE.amd64-x86_64.log')))
|
% (os.path.join(self.topdir, 'logs/amd64-x86_64/livemedia-Server-KDE.amd64-x86_64.log')))
|
||||||
@ -619,7 +619,7 @@ class TestLiveMediaThread(PungiTestCase):
|
|||||||
with mock.patch('time.sleep'):
|
with mock.patch('time.sleep'):
|
||||||
t.process((compose, compose.variants['Server'], config), 1)
|
t.process((compose, compose.variants['Server'], config), 1)
|
||||||
|
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Live media (variant Server, arch *, subvariant KDE) failed, but going on anyway.'),
|
mock.call('[FAIL] Live media (variant Server, arch *, subvariant KDE) failed, but going on anyway.'),
|
||||||
mock.call('BOOM')
|
mock.call('BOOM')
|
||||||
])
|
])
|
||||||
|
@ -588,7 +588,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||||||
t = ostree.OstreeInstallerThread(pool)
|
t = ostree.OstreeInstallerThread(pool)
|
||||||
|
|
||||||
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
|
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Ostree installer (variant Everything, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Ostree installer (variant Everything, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('BOOM')
|
mock.call('BOOM')
|
||||||
])
|
])
|
||||||
@ -618,7 +618,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||||||
t = ostree.OstreeInstallerThread(pool)
|
t = ostree.OstreeInstallerThread(pool)
|
||||||
|
|
||||||
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
|
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
|
||||||
pool._logger.info.assert_has_calls([
|
pool._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Ostree installer (variant Everything, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Ostree installer (variant Everything, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('Runroot task failed: 1234. See %s/%s/runroot.log for more details.'
|
mock.call('Runroot task failed: 1234. See %s/%s/runroot.log for more details.'
|
||||||
% (self.topdir, LOG_PATH))
|
% (self.topdir, LOG_PATH))
|
||||||
|
@ -227,7 +227,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
|||||||
|
|
||||||
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', self.cfg), 1)
|
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', self.cfg), 1)
|
||||||
|
|
||||||
self.compose._logger.info.assert_has_calls([
|
self.compose._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Ostree (variant Everything, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Ostree (variant Everything, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('Runroot task failed: 1234. See %s for more details.'
|
mock.call('Runroot task failed: 1234. See %s for more details.'
|
||||||
% (self.topdir + '/logs/x86_64/Everything/ostree-1/runroot.log'))
|
% (self.topdir + '/logs/x86_64/Everything/ostree-1/runroot.log'))
|
||||||
@ -246,7 +246,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
|||||||
|
|
||||||
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', self.cfg), 1)
|
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', self.cfg), 1)
|
||||||
|
|
||||||
self.compose._logger.info.assert_has_calls([
|
self.compose._logger.error.assert_has_calls([
|
||||||
mock.call('[FAIL] Ostree (variant Everything, arch x86_64) failed, but going on anyway.'),
|
mock.call('[FAIL] Ostree (variant Everything, arch x86_64) failed, but going on anyway.'),
|
||||||
mock.call('BOOM')
|
mock.call('BOOM')
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user