From ccb5821f518467eafff813f1de25d1d17fc87b36 Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Thu, 30 Jul 2020 15:10:52 +1000 Subject: [PATCH] Fix build status update. (#4224) Check for valid statuses rather than only excluding the WORKING status. There are other failure statuses that need to be accounted for (e.g. EXPIRED). --- infra/build/functions/update_build_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/build/functions/update_build_status.py b/infra/build/functions/update_build_status.py index 618a2a58e..566f600e7 100644 --- a/infra/build/functions/update_build_status.py +++ b/infra/build/functions/update_build_status.py @@ -46,7 +46,7 @@ def get_last_build(build_ids): for build_id in reversed(build_ids): project_build = cloudbuild.projects().builds().get(projectId=image_project, id=build_id).execute() - if project_build['status'] == 'WORKING': + if project_build['status'] not in ('SUCCESS', 'FAILURE', 'TIMEOUT'): continue if not builds_status.upload_log(build_id):