getsentry / sentry-slack

DEPRECATED Slack integration for Sentry
http://getsentry.com
BSD 3-Clause "New" or "Revised" License
139 stars 40 forks source link

test configuration error #20

Closed jarvinia closed 9 years ago

jarvinia commented 9 years ago
[ERROR] Plugin(slack) raised an error during test
Traceback (most recent call last):
  File "/www/sentry/local/lib/python2.7/site-packages/sentry/web/helpers.py", line 169, in plugin_config
    test_results = plugin.test_configuration(project)
  File "/www/sentry/local/lib/python2.7/site-packages/sentry/plugins/bases/notify.py", line 120, in test_configuration
    return self.notify_users(event.group, event, fail_silently=False)
  File "/www/sentry/local/lib/python2.7/site-packages/sentry/plugins/bases/notify.py", line 62, in notify_users
    raise NotImplementedError
mattrobenolt commented 9 years ago

What version of Sentry are you trying to use this with?

mattrobenolt commented 9 years ago

Actually, it looks like you're not using the latest version of sentry-slack.

I'm going to push a new release of this to avoid future confusion. :)

jarvinia commented 9 years ago

I think what I am using is the latest version of sentry-slack.

sentry==7.4.3 sentry-slack==0.2.0

mattrobenolt commented 9 years ago

Yeah, I'm going to publish a new verison of sentry-slack here in a bit. We typically recommend installing plugins from git as explained here: https://github.com/getsentry/sentry-slack#install

mattrobenolt commented 9 years ago

@jarvinia Try again with 0.3.0 https://pypi.python.org/pypi/sentry-slack/0.3.0

jarvinia commented 9 years ago

@mattrobenolt Same error with 0.3.0.

screen shot 2015-09-11 at 11 02 20 am
amineck commented 9 years ago

Same error here with the master branch:

import sentry_slack sentry_slack.VERSION '0.4.0' import sentry sentry.VERSION '7.6.0'

amineck commented 9 years ago

I also downgraded to 0.2 to make it work.

mjdavies commented 9 years ago

Works for me on sentry_slack 0.4.0 and sentry 7.7.0

jarvinia commented 9 years ago

I gave up. But eventually I worked around it. Instead I used the webhooks and added a new field text in the json data (/SENTRY_INSTALL_PATH/plugins/sentry_webhooks/plugin.py).

def get_group_data(self, group, event):
        data = {
            'id': str(group.id),
            'checksum': group.checksum,
            'project': group.project.slug,
            'project_name': group.project.name,
            'logger': group.logger,
            'level': group.get_level_display(),
            'culprit': group.culprit,
            'message': event.message,
            'url': group.get_absolute_url(),
            'text': event.message + "\t<" + group.get_absolute_url() + "|Click here> for details!\n",
        }
        data['event'] = dict(event.data or {})
        data['event']['tags'] = event.get_tags()
        return data
dcramer commented 9 years ago

The current version of sentry-slack is not compatible with older versions of the Sentry server.

mattrobenolt commented 9 years ago

@jarvinia Were you getting the same NotImplementedError in 7.7 with 0.4?

jarvinia commented 9 years ago

yeah, the same NotImplementedError, but it is 7.4.3 with 0.3.

mattrobenolt commented 9 years ago

Can you try 0.4 with 7.7 plz?