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

Side by Side Diff: appengine/findit/waterfall/identify_try_job_culprit_pipeline.py

Issue 2290833002: [Findit] Fix a bug that MonitorTryJobPipeline still runs when no try job scheduled. (Closed)
Patch Set: removed unwanted code. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | appengine/findit/waterfall/monitor_try_job_pipeline.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from collections import defaultdict 5 from collections import defaultdict
6 import logging 6 import logging
7 7
8 from google.appengine.ext import ndb 8 from google.appengine.ext import ndb
9 9
10 from common.git_repository import GitRepository 10 from common.git_repository import GitRepository
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 # Arguments number differs from overridden method - pylint: disable=W0221 272 # Arguments number differs from overridden method - pylint: disable=W0221
273 def run( 273 def run(
274 self, master_name, builder_name, build_number, blame_list, try_job_type, 274 self, master_name, builder_name, build_number, blame_list, try_job_type,
275 try_job_id, result): 275 try_job_id, result):
276 """Identifies the information for failed revisions. 276 """Identifies the information for failed revisions.
277 277
278 Please refer to try_job_result_format.md for format check. 278 Please refer to try_job_result_format.md for format check.
279 """ 279 """
280 culprits = None 280 culprits = None
281 if result and result.get('report'): 281 if try_job_id and result and result.get('report'):
282 try_job_data = WfTryJobData.Get(try_job_id) 282 try_job_data = WfTryJobData.Get(try_job_id)
283 if try_job_type == failure_type.COMPILE: 283 if try_job_type == failure_type.COMPILE:
284 # For compile failures, the try job will stop if one revision fails, so 284 # For compile failures, the try job will stop if one revision fails, so
285 # the culprit will be the last revision in the result. 285 # the culprit will be the last revision in the result.
286 failed_revision = _GetFailedRevisionFromCompileResult(result) 286 failed_revision = _GetFailedRevisionFromCompileResult(result)
287 failed_revisions = [failed_revision] if failed_revision else [] 287 failed_revisions = [failed_revision] if failed_revision else []
288 culprits = self._GetCulpritInfo(failed_revisions) 288 culprits = self._GetCulpritInfo(failed_revisions)
289 if culprits: 289 if culprits:
290 result['culprit'] = { 290 result['culprit'] = {
291 'compile': culprits[failed_revision] 291 'compile': culprits[failed_revision]
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 analysis.result_status = updated_result_status 333 analysis.result_status = updated_result_status
334 analysis.suspected_cls = updated_suspected_cls 334 analysis.suspected_cls = updated_suspected_cls
335 analysis.put() 335 analysis.put()
336 336
337 # Store try-job results. 337 # Store try-job results.
338 UpdateTryJobResult() 338 UpdateTryJobResult()
339 # Add try-job results to WfAnalysis. 339 # Add try-job results to WfAnalysis.
340 UpdateWfAnalysisWithTryJobResult() 340 UpdateWfAnalysisWithTryJobResult()
341 341
342 _NotifyCulprits(master_name, builder_name, build_number, culprits) 342 _NotifyCulprits(master_name, builder_name, build_number, culprits)
343 return result.get('culprit') if result else None 343 return result.get('culprit') if result else None
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/waterfall/monitor_try_job_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698