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

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: Update doc string. 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
« no previous file with comments | « appengine/findit/crash/callstack_filters.py ('k') | appengine/findit/crash/fracas_crash_pipeline.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/fracas.py
diff --git a/appengine/findit/crash/fracas.py b/appengine/findit/crash/fracas.py
index 90600dcee03b9482fa1e194de1144eabf7b5ed11..bf2d1e937495c9dfc2054b6da905c1810b648445 100644
--- a/appengine/findit/crash/fracas.py
+++ b/appengine/findit/crash/fracas.py
@@ -4,37 +4,39 @@
"""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 (list): list of dicts mapping from Chrome version to
+ historic metadata.
Returns:
(analysis_result_dict, tag_dict)
The analysis result is a dict like below:
{
"found": True, # Indicate whether anything is found.
- "suspected_project_path": "src/v8", # The full path to the dependency.
- "suspected_project_name": "v8", # A project name of the dependency.
- "components": ["blink>javascript"], # Components to file bug against.
+ "suspected_project": "src/v8", # The full path to the dependency.
+ # Components to file bug against.
+ "suspected_components": ["blink>javascript"],
"culprits": [
{
"url": "https://chromium.googlesource.com/chromium/.../+/hash",
"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 +50,51 @@ 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, signature)
+
+ regression_deps_rolls = {}
+ regression_versions = detect_regression_range.DetectRegressionRange(
+ historic_metadata)
+
+ if regression_versions:
+ last_good_version, first_bad_version = regression_versions
+ # Get regression deps and crash deps.
+ regression_deps_rolls = chromium_deps.GetDEPSRollsDict(
+ last_good_version, first_bad_version, platform)
+
+ culprit_results = findit_for_crash.FindItForCrash(
+ stacktrace, regression_deps_rolls, crash_deps)
+
+ # TODO(katesonia): Enable dependency classifier and component classifier.
+ suspected_project = ''
+ suspected_components = []
+
+ return (
+ {
+ 'found': (bool(suspected_project) or bool(suspected_components) or
+ bool(culprit_results)),
+ 'suspected_project': suspected_project,
+ 'suspected_components': suspected_components,
+ 'culprits': culprit_results,
+ },
+ {
+ 'found_suspects': bool(culprit_results),
+ 'has_regression_range': bool(regression_versions),
+ 'solution': 'core_algorithm',
+ }
+ )
« no previous file with comments | « appengine/findit/crash/callstack_filters.py ('k') | appengine/findit/crash/fracas_crash_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698