Package Details: sentry 9.0.0-1

Git Clone URL: https://aur.archlinux.org/sentry.git (read-only)
Package Base: sentry
Description: Python-based realtime logging and aggregation server.
Upstream URL: http://pypi.python.org/pypi/sentry
Licenses: BSD
Submitter: zancarius
Maintainer: zancarius
Last Packager: zancarius
Votes: 12
Popularity: 0.301333
First Submitted: 2012-11-04 17:15
Last Updated: 2018-07-14 04:40

Latest Comments

1 2 3 4 5 6 ... Next › Last »

zancarius commented on 2018-07-14 04:44

Sentry updated to 9.0.0. You may notice an error akin to:

duplicate key value violates unique constraint "sentry_environmentproject_project_id_29250c1307d3722b_uniq"

This appears to be part of Sentry's normal operation as per #8004 [1].

Be aware that building this PKGBUILD on a machine that isn't in sync with the Sentry host may potentially create a package where uWSGI expects differing versions of glibc or libicu*. Your build and Sentry hosts should always be either 1) updated or 2) in sync.

[1] https://github.com/getsentry/sentry/issues/8004

zancarius commented on 2017-12-24 22:20

I'll release another pkgrel tonight (possibly) with a patch for Sentry's requirements as it appears upstream still has psycopg2>=2.6.0,<2.7.0[1]. I wasn't able to find an active ticket on their repository, either, so feel free to submit one.

[1] https://github.com/getsentry/sentry/blob/ee10875b2649a80e221a5df9a2db675e00d5c3e6/requirements-base.txt#L32

Nukesor commented on 2017-12-24 21:21

The sentry build fails with postgres 10.1

Collecting psycopg2<2.7.0,>=2.6.0 (from sentry==8.22.0)

    Using cached psycopg2-2.6.2.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt

writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

Error: could not determine PostgreSQL version from '10.1'

Related ticket:

https://github.com/psycopg/psycopg2/issues/594

Updating to psycopg2==2.7.1 seems to fix this issue

zancarius commented on 2017-12-11 17:36

Apologies for the nearly 2 week delay bumping Sentry. I received the notification, but promptly forgot following the Thanksgiving holiday due to some personal matters that came up.

zancarius commented on 2017-09-12 03:40

Strange. My instance already had `citext` installed, but I a) don't remember installing it and b) my Sentry user isn't a superuser and doesn't have any attributes other than login. I must've installed it some time ago, but that seems unlikely. It explains why I didn't catch this issue.

One thing I might recommend instead is to use the PostgreSQL super user so you don't have to modify the Sentry user (potentially forgetting it has superuser):

$ sudo -u postgres psql "dbname=sentry"
sentry=# create extension if not exists citext;

Obviously, substituting "sentry" for the actual database name of your Sentry install.

If anyone else runs into this issue, I might update the postupgrade/postinstall with some notes but the cause should be self-explanatory even if the solution is not immediately obvious.

Thanks, Mitch! Good catch as always.

mitchhentges commented on 2017-09-12 02:24

Hmm, getting an error when upgrading from 8.19.0 to 8.20.0:

django.db.utils.ProgrammingError: ProgrammingError('permission denied to create extension "citext"\nHINT: Must be superuser to create this extension.\n',)
SQL: CREATE EXTENSION IF NOT EXISTS citext

I'm guessing because the "sentry" user for my postgresql database isn't a superuser, so I made it one:
ALTER USER sentry WITH SUPERUSER;

After performing migrations, I changed the user back:
ALTER USER sentry WITH NOSUPERUSER;

mitchhentges commented on 2017-06-13 04:10

If anyone's curious for the source of the issue, I've linked to the actual Sentry GitHub issue (https://github.com/getsentry/sentry/issues/5502), which can explain it better than I can :)

Thanks zancarius

zancarius commented on 2017-06-13 04:00

Also, note that for smoothly copying and pasting from the issue resolution into the iPython interpreter, you'll need to remove empty lines that are at the same indentation level.

Edit: Since I forgot the AUR comments don't retain indentation level, I went ahead and fixed the formatting for the fix @mitchhentges linked below[1]. This should copy and paste just fine.

[1] https://gist.github.com/zancarius/33cd0ae7425198a16a63a0024ebf9644

zancarius commented on 2017-06-13 03:57

Removed my previous comment.

@mitchhentges I've pinned your resolution. I don't know if you want to add a little extra commentary to it to indicate the source of the problem or not, but feel free if so.

mitchhentges commented on 2017-06-13 03:54

Resolved the migration issue by following https://github.com/getsentry/sentry/issues/5502.

1. Ensure Sentry is stopped
2. Enter the sentry shell: "sudo -u sentry /opt/sentry/bin/sentry --config=/etc/sentry shell"
3. Copy and paste the script from https://github.com/getsentry/sentry/issues/5502#issuecomment-305902686
- Note: I had some issues with the python interpreter not liking the paste, but if you copy and paste my edited contents in two separate chunks, it should work:https://pastebin.com/1sya7XET and https://pastebin.com/xn7cdJYu
4. Check that you don't have duplicates anymore by running the following script on the shell, which should give you "[]".

from sentry.models import *
dupe_envs = Environment.objects.values('name', 'organization_id').annotate(ecount=Count('id')).filter(ecount__gt=1)
print(dupe_envs)

5. Try migrating again: sudo -u sentry /opt/sentry/bin/sentry --config=/etc/sentry upgrade
6. If migrating again didn't work due to |"sentry_environment_organization_id_6c9098a3d53d6a9a" already exists|, then skip the partially-applied migration: "sudo -u sentry /opt/sentry/bin/sentry --config=/etc/sentry django migrate --fake sentry 0321_auto__add_unique_environment_organization_id_name", then migrate again

-----

I'm not sure that there's a way to make this easier within the "sentry" package, or if it's even within the role of the AUR package to handle this issue. Either way, the technical solution is ^