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

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

Issue 1852383002: [Findit] Integrate with Fracas through Pub/Sub. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 8 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
new file mode 100644
index 0000000000000000000000000000000000000000..a0fe21693e2bd0e591b1b6fcb64cac63d5fc3bb6
--- /dev/null
+++ b/appengine/findit/crash/fracas.py
@@ -0,0 +1,63 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Process crashes from Chrome crash server and find culprits for them."""
+
+
+def FindCulpritForChromeCrash( # Not implemented yet pylint: disable=W0613
+ channel, platform, signature, stack_trace, crashed_version, cpm):
mimee 2016/04/07 23:43:09 cpm->cpms
stgao 2016/04/08 01:14:08 Done.
+ """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.
+ 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.
+ cpm (dict): Mapping from Chrome version to crash per million page loads.
+
+ Returns:
+ (analysis_result_dict, tag_dict)
+ The analysis result is a dict like below:
+ {
+ "found": True, # Indicate whether anything is found.
+ "suspected_dep": "src/v8", # The full path to the dependency.
+ "dep_short_name": "v8", # A short name to represent the dependency.
mimee 2016/04/07 23:43:09 Why dep_short_name when there is suspected_dep? Ca
stgao 2016/04/08 01:14:08 I'd keep it. It is more for display on UI. suspect
mimee 2016/04/08 15:36:03 Would there be a review url, along with revision?
stgao 2016/04/11 20:32:19 I guess you mean code review url. Yes, we could do
+ "components": ["blink>javascript"], # Components to file bug against.
+ "culprits": [
+ {
+ "url": "https://chromium.googlesource.com/chromium/.../+/hash",
+ "revision": "commit-hash",
+ "dep_full_path": "src/v8",
+ "dep_short_name": "v8",
mimee 2016/04/07 23:43:09 Why is there a whole set of those under culprit ag
stgao 2016/04/08 01:14:08 This is for individual CL. Culprits won't be alway
+ "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",
+ "confidence": "high/medium/low/0.6", # Optional confidence score.
+ },
+ ],
+ }
+ 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:
+ {
+ 'found_suspects': True,
+ 'has_regression_range': True,
+ 'solution': 'core_algorithm',
+ }
+ For results using git blame without a regression range:
+ {
+ 'found_suspects': True,
+ 'has_regression_range': False,
+ 'solution': 'blame',
+ }
+ If nothing is found:
+ {
+ 'found_suspects': False,
+ }
+ """
+ # TODO (katesnonia): hook the analysis logic up here.
+ return {'found': False}, {'found_suspects': False} # pragma: no cover.

Powered by Google App Engine
This is Rietveld 408576698