Skip to content

Commit

Permalink
Merge pull request #6909 from nsoranzo/error_reports
Browse files Browse the repository at this point in the history
Update Bug Reports docs to use YAML syntax
  • Loading branch information
jmchilton committed Oct 23, 2018
2 parents ade72dd + cbf8a66 commit 096fe9b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 25 deletions.
39 changes: 20 additions & 19 deletions doc/source/admin/special_topics/bug_reports.rst
Expand Up @@ -6,18 +6,17 @@ gives the administrator more control over how and when bug reports are
generated. In the past, email reports would be generated when the user clicks
the button and only then. Sentry reports would be generated for every failing
tool, as soon as the tool failed. This disparate behaviour was unified under a
single configuration file, ``config/error_report.xml.sample``.
single configuration file, ``config/error_report.yml.sample``.

Let's look at that briefly:

.. code-block:: xml
.. code-block:: yml
<?xml version="1.0"?>
<bug_reports>
<email verbose="true" user_submission="true" />
<json user_submission="false" directory="/tmp/reports/" />
<sentry user_submission="false"/>
</bug_reports>
- type: email
verbose: true
user_submission: true
- type: sentry
user_submission: false
The actual configuration file contains more documentation which has been
stripped out here for the sake of brevity. As you can see, there are a couple of
Expand All @@ -32,10 +31,10 @@ are common to all plugins:
involvement

``verbose``
When ``user_submission=True``, and ``verbose=True``, this indicates that a
When ``user_submission: true``, and ``verbose: true``, this indicates that a
message is to be displayed to the end user. For example, the email plugin will
inform the user that a mail has been sent. Or the JSON plugin will inform the
user that a file has been written to a specific directory.
inform the user that an email has been sent. Similarly, the JSON plugin will
inform the user that a file has been written to a specific directory.

Email
-----
Expand All @@ -56,8 +55,8 @@ This is a demo-plugin that writes the contents of the error report to a file in
your temp directory. This just serves as a full-featured reference
implementation that others can use to build their own bug reporting plugins.

When ``verbose="true" user_submission="true"``, the plugin will inform the user
that a report has been written to ``/tmp/<number>``.
When ``user_submission: true`` and ``verbose: true``, the plugin will inform the
user that a report has been written to ``/tmp/reports/<number>``.

Sentry
------
Expand All @@ -66,18 +65,20 @@ This refactors the existing on-failure submit-to-sentry behaviour into a bug
reporting plugin. Now, for example, you are able to disable the automatic
submission to sentry and only run that whenever the user reports it.

When ``verbose="true" user_submission="true"``, the plugin will inform the user
that ``Submitted bug report to Sentry. Your guru meditation number is
When ``user_submission: true`` and ``verbose: true``, the plugin will inform the
user with ``Submitted bug report to Sentry. Your guru meditation number is
dc907d44ce294f78b267a56f68e5cd1a``, using the same phrasing that is common to
users from Galaxy internal server errors.

InfluxDB
--------

This sends data directly to an InfluxDB server that you have available. If you wish to
use this plugin you will first need to ``pip install influxdb`` in Galaxy's virtual environment.
This sends data directly to an InfluxDB server that you have available. If you
wish to use this plugin you will first need to ``pip install influxdb`` in
Galaxy's Python virtual environment.

This plugin will send a value of ``1`` every time an error occurs, tagged with important information such as:
This plugin will send a value of ``1`` every time an error occurs, tagged with
important information such as:

- handler
- tool_id
Expand All @@ -101,4 +102,4 @@ a matching title. If there are no matching issues, it opens a new issue,
otherwise, it makes a comment on the existing issue. This provides some measure
of de-duplication.

Issues will be tagged with the tool + version
Issues will be tagged with the tool and version.
2 changes: 1 addition & 1 deletion lib/galaxy/tools/error_reports/plugins/biostars.py
Expand Up @@ -6,7 +6,7 @@
from galaxy.util import biostar
from galaxy.util import string_as_bool
from galaxy.web.base.controller import url_for
from ..plugins import ErrorPlugin
from . import ErrorPlugin

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/error_reports/plugins/email.py
Expand Up @@ -5,7 +5,7 @@

from galaxy.tools.errors import EmailErrorReporter
from galaxy.util import string_as_bool
from ..plugins import ErrorPlugin
from . import ErrorPlugin

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/error_reports/plugins/github.py
Expand Up @@ -5,7 +5,7 @@

from galaxy.tools.errors import EmailErrorReporter
from galaxy.util import string_as_bool, unicodify
from ..plugins import ErrorPlugin
from . import ErrorPlugin

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/error_reports/plugins/influxdb.py
Expand Up @@ -11,7 +11,7 @@
influxdb = None

from galaxy.util import unicodify
from ..plugins import ErrorPlugin
from . import ErrorPlugin

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/error_reports/plugins/json.py
Expand Up @@ -7,7 +7,7 @@
import tempfile

from galaxy.util import string_as_bool
from ..plugins import ErrorPlugin
from . import ErrorPlugin

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/error_reports/plugins/sentry.py
Expand Up @@ -3,7 +3,7 @@

from galaxy import web
from galaxy.util import string_as_bool, unicodify
from ..plugins import ErrorPlugin
from . import ErrorPlugin

log = logging.getLogger(__name__)

Expand Down

0 comments on commit 096fe9b

Please sign in to comment.