Differences between revisions 12 and 13
Revision 12 as of 2008-09-19 18:41:39
Size: 6988
Editor: cabernet
Comment:
Revision 13 as of 2008-09-19 22:44:36
Size: 7325
Editor: nebbiolo
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
Automatic error detecting and reporting has become common practice in desktop application and web-based application. The bugs found in the filed may be those that would never be caught during testing. With an automatic bug report system, to file a bug report is just a click on a button on a dialog, therefore bug-reports from various kinds of users become possible, including those non-technical and won’t bother to login to bug tracker and file a detailed report. Automatic error detecting and reporting has become common practice in desktop and web-based applications. The bugs found in the field may be types that wouldn't ever be caught during testing. With an automatic bug report system, filing a bug report is just a click on a button in a dialog. Many more bug-reports from various kinds of users become possible, including non-technical users and those who can't be bothered to login to a bug tracker and file a detailed report.
Line 12: Line 12:
Cytoscape should also have such automatic bug reporting system, which would potentially increase more feedbacks from Cytoscape users and help developers to fix the bugs. This RFC describes how to build an automatic bug reporter for Cytoscape. Cytoscape should consider a similar automatic bug reporting system, which could potentially increase feedback from Cytoscape users and provide developers useful information needed to fix the bugs. This RFC describes how we might build an automatic bug reporter for Cytoscape.
Line 19: Line 19:
Scenario: A user is using Cytoscape for a while and suddenly Cytoscape runs into a problem. An exception is caught and the exception is classified as a bug. A dialog box pops up and asks user if he/she wants to report the error to Cytoscape. If user says “Yes”, information about the bug will be sent to Cytoscape bug tracker. Scenario: A user is using Cytoscape and suddenly Cytoscape runs into a problem. An exception is caught and the exception is classified as a bug. A dialog box pops up and asks user if he/she wants to report the error to Cytoscape. If user says “Yes”, information about the bug will be sent to Cytoscape bug tracker.
Line 27: Line 27:
Cytoscape is running in headless mode and the mode is “interactive”, not “server”. When an exception is caught and the exception is classified as a bug, a message on the console will tell the user what happened and ask the user if he/she wants to report the error to Cytoscape. If user says “Yes”, information about the bug will be sent to Cytoscape bug tracker. If Cytoscape is running in headless mode and the mode is “interactive”, not “server”, then when an exception is caught and the exception is classified as a bug, a message on the console will tell the user what happened and ask the user if he/she wants to report the error to Cytoscape. If the user says “Yes”, information about the bug will be sent to Cytoscape bug tracker.
Line 45: Line 45:
ErrorCode will be used for bug classification purpose and make it easy for bug management in Mantis. We encourage user to give a description about what they did before Cytoscape runs into the problem. This will be very helpful for developer to reproduce the bug. User email address is optional. Many users may not give us their email address at all. However, in case the same bug is reported multiple times, and developer has questions about it, we may contact user if he/she did give us email address ErrorCode would be used for bug classification purposes and to make bug management in Mantis easier. We encourage users to give a description of what they did before Cytoscape ran into the problem. This will be very helpful for developers to reproduce the bug. User email address is optional. Many users may not give us their email address at all. However, in cases where the same bug is reported multiple times, and developer has questions about it, it could be useful to contact user if he/she did provide an email address
Line 49: Line 49:
The subject (summary) of bug report should have the format like this,
ErrorCode
:ClassName:Method:LineNumber:OS:OSVersion
The subject (summary) of bug report should have the format something like this:
Line 52: Line 51:
This format is needed to determine if a bug has already been reported.    ErrorCode:ClassName:Method:LineNumber:OS:OSVersion
Line 54: Line 53:
If a bug has already been reported (with the same subject), the report should be appended to the existing one, rather than open a new one. This string is used to determine if a bug has already been reported.
Line 56: Line 55:
== Automatic bug reporter will be part of CyLogger == If a bug has already been reported (with the same subject), the report should be appended to the existing one, rather than opened as a new one.
Line 58: Line 57:
Since Cytoscape 2.6.1, Cytoscape has its own Logger, CyLogger, which catches all kinds of error messages and present them to the users or developers. CyLogger may be extended to include the automatic error reporter. CyLogger can catch different log messages, including warning, info. However, only Error or Fatal should be reported as Bugs. Any exception thrown in Cytoscape should be caught. If the error will go through the automatic reporting system, appropriate ErrorCode should be assigned based on the nature of the error. == Automatic bug reporter could be part of CyLogger ==

Since Cytoscape 2.6.1, Cytoscape has its own Logger, CyLogger, which catches all error messages not already handled by the task framework and presents them to the users. CyLogger could be extended to include an automatic error reporter. CyLogger can catch different log messages, including warning, info, and debug. It seems reasonable that only Error or Fatal should be reported as bugs. Any exception thrown in Cytoscape should be caught and passed through the automatic reporting system where an appropriate ErrorCode would be assigned based on the nature of the error.
Line 63: Line 64:
The implementation of the automatic bug reporter includes two parts, client side (Cytosape) and server side (Mantis). The client would be responsible for data collecting and submission only and the server for data processing. If a task can be done in either client or server side, we prefer to put it on server side. This is important for easy maintenance in the future. The implementation of the automatic bug reporter includes two parts, client side (Cytosape) and server side (Mantis). The client would be responsible for data collecting and submission only and the server for data processing. If a task can be done on either the client or the server side, then we'd prefer to put it on server side as it makes maintenance easier in the future.
Line 67: Line 68:
Two Java classes in cytoscape.logger package are needed for automatic bug reporter. Two Java classes in cytoscape.logger package would be needed for automatic bug reporter.
Line 90: Line 91:
We may need a web page to list bugs-fixed (CyBugsFixed.php) at Cytoscape web site. In the page, fixed bugs for each Cytoscape versions should be listed, so the users can look at it and search for the bugs they care about and get advice/suggestions for possible work-around. Currently users can search for particular bugs in Cytoscape bug tracker, Mantis. But this is mainly for developers, not for ordinary users. We may need a web page to list bugs-fixed (CyBugsFixed.php) at Cytoscape web site. On the page, fixed bugs for each Cytoscape versions would be listed, so that users could search for the bugs they care about and get advice/suggestions on possible work-arounds. Currently users can search for particular bugs in Cytoscape bug tracker, Mantis. But this is mainly for developers, not for ordinary users.
Line 99: Line 100:
##If you want to create a separate subpage for Comments, then provide this link: ["/Comment"]
Line 101: Line 101:
 *''Add comment here…''

=== How to Comment ===
Edit the page and add your comments under the provided header. By adding your ideas to the Wiki directly, we can more easily organize everyone's ideas, and keep clear records. Be sure to include today's date and your name for each comment. '''Try to keep your comments as concrete and constructive as possible. For example, if you find a part of the RFC makes no sense, please say so, but don't stop there. Take the extra step and propose alternatives.'''
MikeSmoot
 * How would ErrorCodes get assigned? Would we need to manually assigned a code to every exception that gets thrown? Would it be easier to assign codes based on the Exception or the package that contains the Exception?
 * This seems to dovetail with merging the error messages produced by CyLogger and those produced by the Task framework.
 * I would expect the bug report to include the version of cytoscape and possibly a status dump from OSGi that tells us what bundles are loaded, versions, etc..
 * It would be useful if the dialog provided an option for users to submit their session file along with the report.
 * It would be '''really''' useful if we had a command provenance or history system that could tell us everything the user did since startup and we were able to include that in the report.

RFC Name : …

Editor(s): …

Date: …

Status: …

TableOfContents([2])

Proposal

Automatic error detecting and reporting has become common practice in desktop and web-based applications. The bugs found in the field may be types that wouldn't ever be caught during testing. With an automatic bug report system, filing a bug report is just a click on a button in a dialog. Many more bug-reports from various kinds of users become possible, including non-technical users and those who can't be bothered to login to a bug tracker and file a detailed report.

Cytoscape should consider a similar automatic bug reporting system, which could potentially increase feedback from Cytoscape users and provide developers useful information needed to fix the bugs. This RFC describes how we might build an automatic bug reporter for Cytoscape.

Use Cases

1. GUI mode

Scenario: A user is using Cytoscape and suddenly Cytoscape runs into a problem. An exception is caught and the exception is classified as a bug. A dialog box pops up and asks user if he/she wants to report the error to Cytoscape. If user says “Yes”, information about the bug will be sent to Cytoscape bug tracker.

2. Headless mode

If Cytoscape is running in headless mode and the mode is “interactive”, not “server”, then when an exception is caught and the exception is classified as a bug, a message on the console will tell the user what happened and ask the user if he/she wants to report the error to Cytoscape. If the user says “Yes”, information about the bug will be sent to Cytoscape bug tracker.

3. Do not report any bug

In the case that a user decides not to report any error, the user has the option to set the property value “automaticErrorReport” (true, by default) to false and Cytoscape will remember the decision.

Collecting data from Cytoscape user

When Cytoscape crashes or exception thrown, the following information from user should be collected and submitted directly to Cytoscape bug tracker, Mantis

  • Cytoscape version
  • OS version and other system info
  • ErrorCode (or Error Number) – depend on the bug category, API/CORE/GUI/PLUGIN/VISUALSTYLE/OTHER

  • The class and line number in the code where the crash occurred
  • The error message (full stack trace)
  • User’s Description
  • User email address (Optional)

ErrorCode would be used for bug classification purposes and to make bug management in Mantis easier. We encourage users to give a description of what they did before Cytoscape ran into the problem. This will be very helpful for developers to reproduce the bug. User email address is optional. Many users may not give us their email address at all. However, in cases where the same bug is reported multiple times, and developer has questions about it, it could be useful to contact user if he/she did provide an email address

Format of bug report and identification of duplicated bugs

The subject (summary) of bug report should have the format something like this:

  • ErrorCode:ClassName:Method:LineNumber:OS:OSVersion

This string is used to determine if a bug has already been reported.

If a bug has already been reported (with the same subject), the report should be appended to the existing one, rather than opened as a new one.

Automatic bug reporter could be part of CyLogger

Since Cytoscape 2.6.1, Cytoscape has its own Logger, CyLogger, which catches all error messages not already handled by the task framework and presents them to the users. CyLogger could be extended to include an automatic error reporter. CyLogger can catch different log messages, including warning, info, and debug. It seems reasonable that only Error or Fatal should be reported as bugs. Any exception thrown in Cytoscape should be caught and passed through the automatic reporting system where an appropriate ErrorCode would be assigned based on the nature of the error.

Implementation Plan

The implementation of the automatic bug reporter includes two parts, client side (Cytosape) and server side (Mantis). The client would be responsible for data collecting and submission only and the server for data processing. If a task can be done on either the client or the server side, then we'd prefer to put it on server side as it makes maintenance easier in the future.

Cytoscape (client side)

Two Java classes in cytoscape.logger package would be needed for automatic bug reporter.

  1. ErrorCode.java Definition of various Error codes

  2. SubmitErrorReport.java If GUI mode, generate dialogs and submit the data to Cytoscape bug tracker if user says “YES”. If headless mode, prompt for user input and submit the data to Cytoscape bug tracker if user says “YES”.

The automatic error reporter will be triggered by exceptions caught at running time. The following is a snippet of code to show how the automatic bug reporter is triggered.

try {
        //some code
}
catch exception (Exception e){
        logger.SubmitErrorReport(ErrorCode.XXXX, e);
}

Mantis (Server side)

  1. Virtual person: Automatic bug reporter should have its own user name “Automatic bug reporter” in Mantis -- a virtual person, instead of a real developer.
  2. New PHP script (bug_report_auto.php): the new Mantis PHP script will be triggered by “SubmitErrorReport” of Cylogger. This PHP script will (1) check the summary (subject line of the bug report) of the Bug report (2) if this is a new bug, create a new Bug in Mantis, if this is a duplicated bug, append the new report to existing one.

Web page about fixed-bugs

We may need a web page to list bugs-fixed (CyBugsFixed.php) at Cytoscape web site. On the page, fixed bugs for each Cytoscape versions would be listed, so that users could search for the bugs they care about and get advice/suggestions on possible work-arounds. Currently users can search for particular bugs in Cytoscape bug tracker, Mantis. But this is mainly for developers, not for ordinary users.

Link to other related RFCs

Issues

List any issues, conflict, or dependencies raised by this proposal

Comments

MikeSmoot

  • How would ErrorCodes get assigned? Would we need to manually assigned a code to every exception that gets thrown? Would it be easier to assign codes based on the Exception or the package that contains the Exception?

  • This seems to dovetail with merging the error messages produced by CyLogger and those produced by the Task framework.

  • I would expect the bug report to include the version of cytoscape and possibly a status dump from OSGi that tells us what bundles are loaded, versions, etc..
  • It would be useful if the dialog provided an option for users to submit their session file along with the report.
  • It would be really useful if we had a command provenance or history system that could tell us everything the user did since startup and we were able to include that in the report.

AutomaticBugReporter (last edited 2009-02-12 01:03:36 by localhost)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux