| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import logging | 5 import logging |
| 6 | 6 |
| 7 from google.appengine.ext import ndb | 7 from google.appengine.ext import ndb |
| 8 | 8 |
| 9 from common import appengine_util | 9 from common import appengine_util |
| 10 from crash import detect_regression_range | 10 from crash import detect_regression_range |
| 11 from crash.changelist_classifier import ChangelistClassifier | 11 from crash.changelist_classifier import ChangelistClassifier |
| 12 from crash.chromecrash_parser import ChromeCrashParser | 12 from crash.chromecrash_parser import ChromeCrashParser |
| 13 from crash.component_classifier import Component | 13 from crash.component_classifier import Component |
| 14 from crash.component_classifier import ComponentClassifier | 14 from crash.component_classifier import ComponentClassifier |
| 15 from crash.findit import Findit | 15 from crash.findit import Findit |
| 16 from crash.predator import Predator | 16 from crash.predator import Predator |
| 17 from crash.project_classifier import ProjectClassifier | 17 from crash.project_classifier import ProjectClassifier |
| 18 from crash.type_enums import CrashClient | 18 from crash.type_enums import CrashClient |
| 19 from model.crash.cracas_crash_analysis import CracasCrashAnalysis | 19 from model.crash.cracas_crash_analysis import CracasCrashAnalysis |
| 20 from model.crash.crash_config import CrashConfig | 20 from model.crash.crash_config import CrashConfig |
| 21 from model.crash.fracas_crash_analysis import FracasCrashAnalysis | 21 from model.crash.fracas_crash_analysis import FracasCrashAnalysis |
| 22 | 22 |
| 23 # TODO(katesonia): Remove the default value after adding validity check to | 23 # TODO(katesonia): Remove the default value after adding validity check to |
| 24 # config. | 24 # config. |
| 25 _DEFAULT_TOP_N = 7 | 25 _DEFAULT_TOP_N = 7 |
| 26 _FRACAS_FEEDBACK_URL_TEMPLATE = '%s/crash/fracas-result-feedback?key=%s' | 26 _FRACAS_FEEDBACK_URL_TEMPLATE = 'https://%s/crash/fracas-result-feedback?key=%s' |
| 27 | 27 |
| 28 # TODO(wrengr): [Note#1] in many places below we have to do some ugly | 28 # TODO(wrengr): [Note#1] in many places below we have to do some ugly |
| 29 # defaulting in case crash_data is missing certain keys. If we had | 29 # defaulting in case crash_data is missing certain keys. If we had |
| 30 # crash_data be a proper class, rather than an anonymous dict, then we | 30 # crash_data be a proper class, rather than an anonymous dict, then we |
| 31 # could clean all this up by having the properties themselves do the check | 31 # could clean all this up by having the properties themselves do the check |
| 32 # and return the default whenever keys are missing. This would also | 32 # and return the default whenever keys are missing. This would also |
| 33 # let us do things like have regression_range be automatically computed | 33 # let us do things like have regression_range be automatically computed |
| 34 # from historical_metadata (when historical_metadata is provided and | 34 # from historical_metadata (when historical_metadata is provided and |
| 35 # regression_range is not). | 35 # regression_range is not). |
| 36 | 36 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 def GetAnalysis(self, crash_identifiers): | 170 def GetAnalysis(self, crash_identifiers): |
| 171 # TODO: inline FracasCrashAnalysis.Get stuff here. | 171 # TODO: inline FracasCrashAnalysis.Get stuff here. |
| 172 return FracasCrashAnalysis.Get(crash_identifiers) | 172 return FracasCrashAnalysis.Get(crash_identifiers) |
| 173 | 173 |
| 174 def ProcessResultForPublishing(self, result, key): | 174 def ProcessResultForPublishing(self, result, key): |
| 175 """Fracas specific processing of result data for publishing.""" | 175 """Fracas specific processing of result data for publishing.""" |
| 176 result['feedback_url'] = _FRACAS_FEEDBACK_URL_TEMPLATE % ( | 176 result['feedback_url'] = _FRACAS_FEEDBACK_URL_TEMPLATE % ( |
| 177 appengine_util.GetDefaultVersionHostname(), key) | 177 appengine_util.GetDefaultVersionHostname(), key) |
| 178 return result | 178 return result |
| OLD | NEW |