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

Unified Diff: appengine/findit/crash/fracas.py

Issue 1950123003: [Findit] Fetch DEPS from buildspec/ instead of trunk for chrome official builds. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: appengine/findit/crash/fracas.py
diff --git a/appengine/findit/crash/fracas.py b/appengine/findit/crash/fracas.py
index 90600dcee03b9482fa1e194de1144eabf7b5ed11..0e005aeb58d682c1b1d17ba1ad315b8daa0cf0c5 100644
--- a/appengine/findit/crash/fracas.py
+++ b/appengine/findit/crash/fracas.py
@@ -4,21 +4,23 @@
"""Process crashes from Chrome crash server and find culprits for them."""
+from common import chromium_deps
+from crash import detect_regression_range
+from crash import findit_for_crash
+from crash.fracas_parser import FracasParser
-def FindCulpritForChromeCrash( # Not implemented yet pylint: disable=W0613
- channel, platform, signature, stack_trace,
- crashed_version, versions_to_cpm):
+
+def FindCulpritForChromeCrash(signature, platform,
+ stack_trace, crashed_version, historic_metadata):
"""Finds culprits for a Chrome crash.
Args:
- channel (str): The channel name, could be 'dev', 'canary', 'beta', etc.
platform (str): The platform name, could be 'win', 'mac', 'linux',
- 'android', 'ios', etc.
+ 'android', 'ios', etc.
signature (str): The signature of a crash on the Chrome crash server.
stack_trace (str): A string containing the stack trace of a crash.
crash_version (str): The version of Chrome in which the crash occurred.
- versions_to_cpm (dict): Mapping from Chrome version to crash per million
- page loads.
+ historic_metadata (dict): Mapping from Chrome version to historic metadata.
stgao 2016/05/05 17:32:28 Is it still a dict?
Sharu Jiang 2016/05/05 20:26:45 Done.
Returns:
(analysis_result_dict, tag_dict)
@@ -34,7 +36,6 @@ def FindCulpritForChromeCrash( # Not implemented yet pylint: disable=W0613
"revision": "commit-hash",
"code_review_url": "https://codereview.chromium.org/ISSUE",
"project_path": "src/v8",
- "project_name": "v8",
"author": "who@chromium.org",
"time": "2015-08-17 03:38:16", # When the revision was committed.
"reason": "A plain string with '\n' as line break to explain why",
@@ -48,22 +49,50 @@ def FindCulpritForChromeCrash( # Not implemented yet pylint: disable=W0613
The tag dict are allowed key/value pairs to tag the analysis result for
query and monitoring purpose on Findit side. For allowed keys, please
refer to crash_analysis.py and fracas_crash_analysis.py:
- For results with normal culprit-finding algorithm:
- {
+ For results with normal culprit-finding algorithm: {
'found_suspects': True,
'has_regression_range': True,
'solution': 'core_algorithm',
- }
- For results using git blame without a regression range:
- {
+ }
+ For results using git blame without a regression range: {
'found_suspects': True,
'has_regression_range': False,
'solution': 'blame',
- }
- If nothing is found:
- {
+ }
+ If nothing is found: {
'found_suspects': False,
- }
+ }
"""
- # TODO (katesonia): hook the analysis logic up here.
- return {'found': False}, {'found_suspects': False} # pragma: no cover.
+ crash_deps = chromium_deps.GetChromeDependency(crashed_version, platform)
+ stacktrace = FracasParser().Parse(stack_trace, crash_deps)
+
+ regression_deps_rolls = {}
+ regression_versions = detect_regression_range.DetectRegressionRange(
+ historic_metadata)
+
+ if regression_versions:
+ good_version, bad_version = regression_versions
Martin Barbella 2016/05/05 16:37:37 How about last_good_version, first_bad_version? Ma
Sharu Jiang 2016/05/05 20:26:45 Done.
+ # Get regression deps and crash deps.
+ regression_deps_rolls = chromium_deps.GetDEPSRollsDict(
+ good_version, bad_version, platform)
+
+ culprit_results = findit_for_crash.FindItForCrash(
+ stacktrace, regression_deps_rolls, crash_deps)
+
+ # TODO(katesonia): Enable dependency classifier and component classifier.
+ suspected_dep = ''
+ suspected_components = []
+
+ return (
+ {
+ 'found': True,
Martin Barbella 2016/05/05 16:37:37 Is this correct?
Sharu Jiang 2016/05/05 20:26:45 No, updated it.
+ 'suspected_dep': suspected_dep,
+ 'suspected_components': suspected_components,
+ 'culprits': culprit_results,
+ },
+ {
+ 'found_suspects': bool(culprit_results),
+ 'has_regression_range': bool(regression_versions),
+ 'solution': 'core_algorithm',
stgao 2016/05/05 17:32:28 Is it always 'core_algorithm'? What if there is no
Sharu Jiang 2016/05/05 20:26:45 Right now, we don't support the git blame yet beca
stgao 2016/05/05 21:02:46 In that case, if we don't have regression range, s
Sharu Jiang 2016/05/05 23:03:45 In FindItForCrash, we checkout if the regression_d
stgao 2016/05/06 19:11:24 As long as analysis is not run and empty result is
+ }
+ )

Powered by Google App Engine
This is Rietveld 408576698