| OLD | NEW |
| 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 timedelta | 5 from datetime import timedelta |
| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 need_new_try_job = _NeedANewCompileTryJob( | 330 need_new_try_job = _NeedANewCompileTryJob( |
| 331 master_name, builder_name, build_number, failure_info) | 331 master_name, builder_name, build_number, failure_info) |
| 332 else: | 332 else: |
| 333 need_new_try_job = _NeedANewTestTryJob( | 333 need_new_try_job = _NeedANewTestTryJob( |
| 334 master_name, builder_name, build_number, failure_info, force_try_job) | 334 master_name, builder_name, build_number, failure_info, force_try_job) |
| 335 | 335 |
| 336 # TODO(chanli): enable the feature to trigger single try job for a group | 336 # TODO(chanli): enable the feature to trigger single try job for a group |
| 337 # when notification is ready. | 337 # when notification is ready. |
| 338 # We still call _IsBuildFailureUniqueAcrossPlatforms just so we have data for | 338 # We still call _IsBuildFailureUniqueAcrossPlatforms just so we have data for |
| 339 # failure groups. | 339 # failure groups. |
| 340 |
| 341 # TODO(chanli): Add checking for culprits of the group when enabling |
| 342 # single try job: add current build to suspected_cl.builds if the try job for |
| 343 # this group has already completed. |
| 340 if need_new_try_job: | 344 if need_new_try_job: |
| 341 _IsBuildFailureUniqueAcrossPlatforms( | 345 _IsBuildFailureUniqueAcrossPlatforms( |
| 342 master_name, builder_name, build_number, try_job_type, | 346 master_name, builder_name, build_number, try_job_type, |
| 343 failure_info['builds'][str(build_number)]['blame_list'], | 347 failure_info['builds'][str(build_number)]['blame_list'], |
| 344 failure_info['failed_steps'], signals, heuristic_result) | 348 failure_info['failed_steps'], signals, heuristic_result) |
| 345 | 349 |
| 346 need_new_try_job = need_new_try_job and ReviveOrCreateTryJobEntity( | 350 need_new_try_job = need_new_try_job and ReviveOrCreateTryJobEntity( |
| 347 master_name, builder_name, build_number, force_try_job) | 351 master_name, builder_name, build_number, force_try_job) |
| 348 return need_new_try_job | 352 return need_new_try_job |
| 349 | 353 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 361 master_name, builder_name) | 365 master_name, builder_name) |
| 362 for source_target in signals['compile'].get('failed_targets', []): | 366 for source_target in signals['compile'].get('failed_targets', []): |
| 363 # For link failures, we pass the executable targets directly to try-job, and | 367 # For link failures, we pass the executable targets directly to try-job, and |
| 364 # there is no 'source' for link failures. | 368 # there is no 'source' for link failures. |
| 365 # For compile failures, only pass the object files as the compile targets | 369 # For compile failures, only pass the object files as the compile targets |
| 366 # for the bots that we use strict regex to extract such information. | 370 # for the bots that we use strict regex to extract such information. |
| 367 if not source_target.get('source') or strict_regex: | 371 if not source_target.get('source') or strict_regex: |
| 368 compile_targets.append(source_target.get('target')) | 372 compile_targets.append(source_target.get('target')) |
| 369 | 373 |
| 370 return compile_targets | 374 return compile_targets |
| OLD | NEW |