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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 """Process crashes from Chrome crash server and find culprits for them."""
6
7
8 def FindCulpritForChromeCrash( # Not implemented yet pylint: disable=W0613
9 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.
10 """Finds culprits for a Chrome crash.
11
12 Args:
13 channel (str): The channel name, could be 'dev', 'canary', 'beta', etc.
14 platform (str): The platform name, could be 'win', 'mac', 'linux',
15 'android', 'ios', etc.
16 signature (str): The signature of a crash on the Chrome crash server.
17 stack_trace (str): A string containing the stack trace of a crash.
18 crash_version (str): The version of Chrome in which the crash occurred.
19 cpm (dict): Mapping from Chrome version to crash per million page loads.
20
21 Returns:
22 (analysis_result_dict, tag_dict)
23 The analysis result is a dict like below:
24 {
25 "found": True, # Indicate whether anything is found.
26 "suspected_dep": "src/v8", # The full path to the dependency.
27 "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
28 "components": ["blink>javascript"], # Components to file bug against.
29 "culprits": [
30 {
31 "url": "https://chromium.googlesource.com/chromium/.../+/hash",
32 "revision": "commit-hash",
33 "dep_full_path": "src/v8",
34 "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
35 "author": "who@chromium.org",
36 "time": "2015-08-17 03:38:16", # When the revision was committed.
37 "reason": "A plain string with '\n' as line break to explain why",
38 "confidence": "high/medium/low/0.6", # Optional confidence score.
39 },
40 ],
41 }
42 The tag dict are allowed key/value pairs to tag the analysis result for
43 query and monitoring purpose on Findit side. For allowed keys, please
44 refer to crash_analysis.py and fracas_crash_analysis.py:
45 For results with normal culprit-finding algorithm:
46 {
47 'found_suspects': True,
48 'has_regression_range': True,
49 'solution': 'core_algorithm',
50 }
51 For results using git blame without a regression range:
52 {
53 'found_suspects': True,
54 'has_regression_range': False,
55 'solution': 'blame',
56 }
57 If nothing is found:
58 {
59 'found_suspects': False,
60 }
61 """
62 # TODO (katesnonia): hook the analysis logic up here.
63 return {'found': False}, {'found_suspects': False} # pragma: no cover.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698