| 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 collections import defaultdict | 5 from collections import defaultdict |
| 6 import copy | 6 import copy |
| 7 import logging | 7 import logging |
| 8 | 8 |
| 9 from google.appengine.ext import ndb | 9 from google.appengine.ext import ndb |
| 10 | 10 |
| 11 from common.http_client_appengine import HttpClientAppengine as HttpClient | 11 from common.http_client_appengine import HttpClientAppengine as HttpClient |
| 12 from common.pipeline_wrapper import BasePipeline | 12 from common.pipeline_wrapper import BasePipeline |
| 13 from common.waterfall import failure_type | 13 from common.waterfall import failure_type |
| 14 from lib.gitiles.gitiles_repository import GitilesRepository | 14 from gae_libs.gitiles.cached_gitiles_repository import CachedGitilesRepository |
| 15 from model import analysis_approach_type | 15 from model import analysis_approach_type |
| 16 from model import analysis_status | 16 from model import analysis_status |
| 17 from model import result_status | 17 from model import result_status |
| 18 from model.wf_analysis import WfAnalysis | 18 from model.wf_analysis import WfAnalysis |
| 19 from model.wf_try_job_data import WfTryJobData | 19 from model.wf_try_job_data import WfTryJobData |
| 20 from model.wf_try_job import WfTryJob | 20 from model.wf_try_job import WfTryJob |
| 21 from waterfall import suspected_cl_util | 21 from waterfall import suspected_cl_util |
| 22 from waterfall.send_notification_for_culprit_pipeline import ( | 22 from waterfall.send_notification_for_culprit_pipeline import ( |
| 23 SendNotificationForCulpritPipeline) | 23 SendNotificationForCulpritPipeline) |
| 24 | 24 |
| 25 | 25 |
| 26 GIT_REPO = GitilesRepository( | 26 GIT_REPO = CachedGitilesRepository( |
| 27 HttpClient(), 'https://chromium.googlesource.com/chromium/src.git') | 27 HttpClient(), 'https://chromium.googlesource.com/chromium/src.git') |
| 28 | 28 |
| 29 | 29 |
| 30 def _GetResultAnalysisStatus(analysis, result): | 30 def _GetResultAnalysisStatus(analysis, result): |
| 31 """Returns the analysis status based on existing status and try job result. | 31 """Returns the analysis status based on existing status and try job result. |
| 32 | 32 |
| 33 Args: | 33 Args: |
| 34 analysis: The WfAnalysis entity corresponding to this try job. | 34 analysis: The WfAnalysis entity corresponding to this try job. |
| 35 result: A result dict containing the result of this try job. | 35 result: A result dict containing the result of this try job. |
| 36 | 36 |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 UpdateWfAnalysisWithTryJobResult() | 400 UpdateWfAnalysisWithTryJobResult() |
| 401 | 401 |
| 402 # TODO (chanli): Update suspected_cl for builds in the same group with | 402 # TODO (chanli): Update suspected_cl for builds in the same group with |
| 403 # current build. | 403 # current build. |
| 404 # Updates suspected_cl. | 404 # Updates suspected_cl. |
| 405 UpdateSuspectedCLs() | 405 UpdateSuspectedCLs() |
| 406 | 406 |
| 407 _NotifyCulprits(master_name, builder_name, build_number, culprits, | 407 _NotifyCulprits(master_name, builder_name, build_number, culprits, |
| 408 heuristic_cls, compile_suspected_cl) | 408 heuristic_cls, compile_suspected_cl) |
| 409 return result.get('culprit') if result else None | 409 return result.get('culprit') if result else None |
| OLD | NEW |