Issue408

Title Tracker development setup fails
Priority bug Status chatting
Superseder Nosy List berker.peksag, ezio.melotti, loewis, techtonik, vinay.sajip
Assigned To Topics

Created on 2011-07-02.11:55:29 by vinay.sajip, last changed 2016-06-10.02:28:57 by berker.peksag.

Files
File name Uploaded Type Edit Remove
unnamed techtonik, 2011-12-13.08:05:57 text/plain
unnamed techtonik, 2011-12-13.20:41:48 text/plain
unnamed techtonik, 2011-12-13.21:01:50 text/plain
Messages
msg2111 (view) Author: vinay.sajip Date: 2011-07-02.11:55:29
I tried to set up an instance of the Python tracker for development, according to the instructions given at

http://wiki.python.org/moin/TrackerDevelopment

I get an error relating to Rietveld setup, despite following all the suggested steps:

(roundup)vinay@eta-natty:~/tools/pytracker/instances/python-dev$ roundup-admin -i `pwd` init
Admin Password: 
       Confirm: 
Traceback (most recent call last):
  File "/home/vinay/.virtualenvs/roundup/bin/roundup-admin", line 3, in <module>
    run()
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/scripts/roundup_admin.py", line 38, in run
    sys.exit(tool.main())
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/admin.py", line 1546, in main
    ret = self.run_command(args)
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/admin.py", line 1424, in run_command
    return self.do_initialise(self.tracker_home, args)
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/admin.py", line 517, in do_initialise
    tracker.init(password.Password(adminpw))
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/instance.py", line 199, in init
    'admin_email': self.config['ADMIN_EMAIL']})
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/instance.py", line 211, in _load_python
    execfile(file, vars)
  File "/home/vinay/tools/pytracker/instances/python-dev/initial_data.py", line 116, in <module>
    user.create(username="admin", password=adminpw, address=admin_email, roles='Admin')
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/backends/rdbms_common.py", line 1389, in create
    self.fireReactors('create', newid, None)
  File "/home/vinay/.virtualenvs/roundup/lib/python2.7/site-packages/roundup/hyperdb.py", line 1220, in fireReactors
    react(self.db, self, nodeid, oldvalues)
  File "/home/vinay/tools/pytracker/instances/python-dev/detectors/rietveldreactor.py", line 16, in create_django_user
    (nodeid, username, email))
psycopg2.ProgrammingError: relation "auth_user" does not exist
LINE 1: insert into auth_user(id, username, email, password, first_n...
                    ^

(roundup)vinay@eta-natty:~/tools/pytracker/instances/python-dev$ 

I would suggest that one of these approaches should be taken:

1. The configuration is changed so that Rietveld integration does not occur by default, and the documentation is updated to tell those who need it how to do Rietveld integration (as is done for Spambayes)

2. Change the init script to do the relevant Django /Rietveld configuration magic so that users who just want to e.g. hack on some templates for the basic UI (like me in this case :-) don't get side-tracked into some rabbit-hole ...
msg2119 (view) Author: ezio.melotti Date: 2011-07-19.20:26:13
You could try adding a 'return' at the first line of the 'init' function in python-dev/detectors/rietveldreactor.py to disable the rietveld reactor.
I agree it would be better to have it disabled by default.
msg2350 (view) Author: ezio.melotti Date: 2011-12-13.00:16:28
FWIW I updated the TrackerDevelopment page and you should now be able to get a running instance of the tracker if you follow the instructions.
Basically you just have to disable the cia detector and also the spambayes and rietveld ones if you are not planning to use them.  You shouldn't need spambayes, but if you want to test things on rietveld you'll have to figure out how to make it work (and if you do, please update the wiki or write it down here).
Note that these are just workarounds, a proper fix would still be better.
msg2351 (view) Author: techtonik Date: 2011-12-13.08:05:58
On Tue, Dec 13, 2011 at 3:16 AM, Ezio Melotti <
metatracker@psf.upfronthosting.co.za> wrote:

>
> Ezio Melotti <ezio.melotti@gmail.com> added the comment:
>
> FWIW I updated the TrackerDevelopment page and you should now be able to
> get a running instance of the tracker if you follow the instructions.
> Basically you just have to disable the cia detector and also the spambayes
> and rietveld ones if you are not planning to use them.  You shouldn't need
> spambayes, but if you want to test things on rietveld you'll have to figure
> out how to make it work (and if you do, please update the wiki or write it
> down here).
> Note that these are just workarounds, a proper fix would still be better.
>

These patches doesn't look awesome. Is it possible to implement a plug-in
behavior for these components, so that they could be enabled in config?
msg2353 (view) Author: ezio.melotti Date: 2011-12-13.20:21:16
As I said they are just workarounds, and in the meanwhile it's better to share them than waiting for someone to fix the installation.
The fix to /disable/ these components is probably quite easy -- putting the 'returns' in an 'if' that checks some value in the config should be enough.  OTOH it would be better to figure out how to install and enable the additional components, especially rietveld.  AFAIU the error reported by Vinay can be fixed by running some django/rietveld script (manage.py syncdb maybe?), but I didn't have time to try it yet.  Maybe Martin knows.
msg2354 (view) Author: techtonik Date: 2011-12-13.20:41:48
On Tue, Dec 13, 2011 at 11:21 PM, Ezio Melotti <
metatracker@psf.upfronthosting.co.za> wrote:

> As I said they are just workarounds, and in the meanwhile it's better to
> share them than waiting for someone to fix the installation.
>

Right, but are there any issues opened at Roundup side to make mysterious
'someone' aware of the issues?

> The fix to /disable/ these components is probably quite easy -- putting
> the 'returns' in an 'if' that checks some value in the config should be
> enough.

Isn't Roundup config static? (I feel like I forgot a lot since the last
time I visited Roundup codebase)

>  OTOH it would be better to figure out how to install and enable the
> additional components, especially rietveld.  AFAIU the error reported by
> Vinay can be fixed by running some django/rietveld script (manage.py syncdb
> maybe?), but I didn't have time to try it yet.  Maybe Martin knows.

What error are you speaking about?
msg2355 (view) Author: vinay.sajip Date: 2011-12-13.20:49:18
> What error are you speaking about?

The one that I opened the issue with.

Ezio, thanks for the update, but I'm unfortunately tied up with other work for the moment, and will get back to this when time allows.
msg2356 (view) Author: techtonik Date: 2011-12-13.21:01:50
On Tue, Dec 13, 2011 at 11:49 PM, Vinay Sajip <
metatracker@psf.upfronthosting.co.za> wrote:

>
> Vinay Sajip <vinay_sajip@yahoo.co.uk> added the comment:
>
> > What error are you speaking about?
>
> The one that I opened the issue with.
>

Whoops. =)  Did anybody published incomplete findings in this regard?
msg2357 (view) Author: ezio.melotti Date: 2011-12-13.22:21:25
> Right, but are there any issues opened at Roundup side to make mysterious
> 'someone' aware of the issues?

The extensions we use and how they are configured depend on us, so that 'someone' is probably either me or Martin.  Since I already have a tracker installed on my machine and I don't have to install new ones, installation problems are not high on my list.

> Isn't Roundup config static? (I feel like I forgot a lot since the last
> time I visited Roundup codebase)

I think you can just put in the .ini something like
[detectors]
spambayes = off
rietveld = on
cia = off

and then in e.g. detectors/cia.py:init
if db.config.detectors['cia'] != 'on':
    return

> Did anybody published incomplete findings in this regard?

Someone just pointed out that possibility during a discussion on IRC.
History
Date User Action Args
2016-06-10 02:28:57berker.peksagsetnosy: + berker.peksag
2011-12-13 22:21:26ezio.melottisetmessages: + msg2357
2011-12-13 21:01:51techtoniksetfiles: + unnamed
messages: + msg2356
2011-12-13 20:49:19vinay.sajipsetmessages: + msg2355
2011-12-13 20:41:48techtoniksetfiles: + unnamed
messages: + msg2354
2011-12-13 20:21:16ezio.melottisetmessages: + msg2353
2011-12-13 08:05:58techtoniksetfiles: + unnamed
nosy: + techtonik
messages: + msg2351
2011-12-13 00:16:28ezio.melottisetmessages: + msg2350
2011-07-19 20:26:13ezio.melottisetstatus: unread -> chatting
nosy: + loewis, ezio.melotti
messages: + msg2119
2011-07-02 11:55:29vinay.sajipcreate