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

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

Issue 2203033004: Only run _IsBuildFailureUniqueAcrossPlatforms if need_new_try_job is true. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/infra/infra into key-error-fix 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 datetime import datetime 5 from datetime import datetime
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 import appengine_util 10 from common import appengine_util
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 need_new_try_job, last_pass = _CheckFailureForTryJobKey( 311 need_new_try_job, last_pass = _CheckFailureForTryJobKey(
312 master_name, builder_name, build_number, 312 master_name, builder_name, build_number,
313 failure_result_map, TryJobType.COMPILE, failed_steps['compile']) 313 failure_result_map, TryJobType.COMPILE, failed_steps['compile'])
314 else: 314 else:
315 try_job_type = TryJobType.TEST 315 try_job_type = TryJobType.TEST
316 targeted_tests, need_new_try_job, last_pass = ( 316 targeted_tests, need_new_try_job, last_pass = (
317 _CheckIfNeedNewTryJobForTestFailure( 317 _CheckIfNeedNewTryJobForTestFailure(
318 'step', master_name, builder_name, build_number, failure_result_map, 318 'step', master_name, builder_name, build_number, failure_result_map,
319 failed_steps)) 319 failed_steps))
320 320
321 # TODO(josiahk): Integrate this into need_new_try_job boolean
322 _IsBuildFailureUniqueAcrossPlatforms(
323 master_name, builder_name, build_number, build_failure_type,
324 builds[str(build_number)]['blame_list'], failed_steps, signals,
325 heuristic_result)
326 321
327 need_new_try_job = ( 322 need_new_try_job = (
328 need_new_try_job and ReviveOrCreateTryJobEntity( 323 need_new_try_job and ReviveOrCreateTryJobEntity(
329 master_name, builder_name, build_number, force_try_job)) 324 master_name, builder_name, build_number, force_try_job))
330 325
326 # TODO(josiahk): Integrate _IsBuildFailureUniqueAcrossPlatforms() into
327 # need_new_try_job boolean
328 if need_new_try_job:
329 _IsBuildFailureUniqueAcrossPlatforms(
330 master_name, builder_name, build_number, build_failure_type,
331 builds[str(build_number)]['blame_list'], failed_steps, signals,
332 heuristic_result)
333
331 return need_new_try_job, last_pass, try_job_type, targeted_tests 334 return need_new_try_job, last_pass, try_job_type, targeted_tests
332 335
333 336
334 def _GetFailedTargetsFromSignals(signals, master_name, builder_name): 337 def _GetFailedTargetsFromSignals(signals, master_name, builder_name):
335 compile_targets = [] 338 compile_targets = []
336 339
337 if not signals or 'compile' not in signals: 340 if not signals or 'compile' not in signals:
338 return compile_targets 341 return compile_targets
339 342
340 if signals['compile'].get('failed_output_nodes'): 343 if signals['compile'].get('failed_output_nodes'):
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 pipeline.pipeline_status_path, try_job_type) 434 pipeline.pipeline_status_path, try_job_type)
432 else: # pragma: no cover 435 else: # pragma: no cover
433 logging_str = ( 436 logging_str = (
434 'Try job was scheduled for build %s, %s, %s: %s because of %s ' 437 'Try job was scheduled for build %s, %s, %s: %s because of %s '
435 'failure.') % ( 438 'failure.') % (
436 master_name, builder_name, build_number, 439 master_name, builder_name, build_number,
437 pipeline.pipeline_status_path, try_job_type) 440 pipeline.pipeline_status_path, try_job_type)
438 logging.info(logging_str) 441 logging.info(logging_str)
439 442
440 return failure_result_map 443 return failure_result_map
OLDNEW
« 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