Standardize the internal error logs for better tracking

This commit is contained in:
Joseph Schorr 2016-10-31 13:45:46 -04:00
parent 0954240ccb
commit 9f9d32548b
2 changed files with 6 additions and 2 deletions

View file

@ -346,7 +346,8 @@ class BuildComponent(BaseComponent):
# Mark the build as completed.
if worker_error.is_internal_error():
logger.exception('Got remote internal exception for build: %s', build_id)
logger.exception('[BUILD INTERNAL ERROR: Remote] Build ID: %s: %s', build_id,
worker_error.public_message())
trollius.async(self._build_finished(BuildJobResult.INCOMPLETE))
else:
logger.debug('Got remote failure exception for build %s: %s', build_id, aex)
@ -462,6 +463,8 @@ class BuildComponent(BaseComponent):
self._build_status.set_error('Build worker timed out', internal_error=True,
requeued=self._current_job.has_retries_remaining())
build_id = self._current_job.build_uuid
logger.error('[BUILD INTERNAL ERROR: Timeout] Build ID: %s', build_id)
yield From(self.parent_manager.job_completed(self._current_job,
BuildJobResult.INCOMPLETE,
self))