Add executor name to the build metric
This commit is contained in:
parent
30af8aef1a
commit
1571b2867a
3 changed files with 11 additions and 7 deletions
|
@ -182,6 +182,7 @@ class EphemeralBuilderManager(BaseManager):
|
|||
self._build_uuid_to_info.pop(build_job.build_uuid, None)
|
||||
raise Return()
|
||||
|
||||
executor_name = build_info.executor_name
|
||||
execution_id = build_info.execution_id
|
||||
|
||||
# If we have not yet received a heartbeat, then the node failed to boot in some way. We mark
|
||||
|
@ -194,7 +195,7 @@ class EphemeralBuilderManager(BaseManager):
|
|||
got_lock = yield From(self._take_etcd_atomic_lock('job-expired', build_job.build_uuid))
|
||||
if got_lock:
|
||||
logger.warning('Marking job %s as incomplete', build_job.build_uuid)
|
||||
self.job_complete_callback(build_job, BuildJobResult.INCOMPLETE)
|
||||
self.job_complete_callback(build_job, BuildJobResult.INCOMPLETE, executor_name)
|
||||
|
||||
# Finally, we terminate the build execution for the job. We don't do this under a lock as
|
||||
# terminating a node is an atomic operation; better to make sure it is terminated than not.
|
||||
|
@ -540,7 +541,10 @@ class EphemeralBuilderManager(BaseManager):
|
|||
build_job.build_uuid, job_status)
|
||||
|
||||
# Mark the job as completed.
|
||||
self.job_complete_callback(build_job, job_status)
|
||||
build_info = self._build_uuid_to_info.get(build_job.build_uuid, None)
|
||||
executor_name = build_info.executor_name if build_info else None
|
||||
|
||||
self.job_complete_callback(build_job, job_status, executor_name)
|
||||
|
||||
# Kill the ephmeral builder.
|
||||
yield From(self.kill_builder_executor(build_job.build_uuid))
|
||||
|
|
Reference in a new issue