Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: appengine/findit/waterfall/monitor_try_job_pipeline.py

Issue 2260313003: [Findit] Capture and store latest buildbucket response with each query (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/monitor_try_job_pipeline.py
diff --git a/appengine/findit/waterfall/monitor_try_job_pipeline.py b/appengine/findit/waterfall/monitor_try_job_pipeline.py
index 0584130675192e97cdfaeab86d73b3af3545378f..bb864a71fd8732575b08e38f5bc345756fbf4918 100644
--- a/appengine/findit/waterfall/monitor_try_job_pipeline.py
+++ b/appengine/findit/waterfall/monitor_try_job_pipeline.py
@@ -206,6 +206,7 @@ class MonitorTryJobPipeline(BasePipeline):
start_time = None
while True:
error, build = buildbucket_client.GetTryJobs([try_job_id])[0]
+
if error:
if allowed_response_error_times > 0:
allowed_response_error_times -= 1
@@ -253,4 +254,10 @@ class MonitorTryJobPipeline(BasePipeline):
'Try job %s timed out after %d hours.' % (
try_job_id, timeout_hours))
+ # Ensure last_buildbucket_response is always the most recent
+ # whenever available during intermediate queries.
+ if build and build.response:
+ try_job_data.last_buildbucket_response = build.response
stgao 2016/08/19 21:44:36 nit: not update datastore if the current response
+ try_job_data.put()
+
time.sleep(pipeline_wait_seconds) # pragma: no cover
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698