Upgrade issues from 1.5.7 to 1.6.5

2012-04-23 Thread Stephen Gallagher
I'm getting the following error while trying to upgrade my 1.5.7 install
to the newer 1.6.5 package during 'rb-site upgrade'.

I am using django_evolution 0.6.7. This error is resulting in an outage
situation, so I could really use some help quickly :(


  File /usr/bin/rb-site, line 9, in module
load_entry_point('ReviewBoard==1.6.5', 'console_scripts',
'rb-site')()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 1760, in main
command.run()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 1650, in run
site.migrate_database()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 353, in migrate_database
self.run_manage_command(evolve, [--noinput, --execute])
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 469, in run_manage_command
execute_manager(reviewboard.settings, [__file__, cmd] + params)
  File
/usr/lib/python2.6/site-packages/django/core/management/__init__.py,
line 438, in execute_manager
utility.execute()
  File
/usr/lib/python2.6/site-packages/django/core/management/__init__.py,
line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
/usr/lib/python2.6/site-packages/django/core/management/base.py, line
191, in run_from_argv
self.execute(*args, **options.__dict__)
  File
/usr/lib/python2.6/site-packages/django/core/management/base.py, line
220, in execute
output = self.handle(*args, **options)
  File
/usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
 line 60, in handle
self.evolve(*app_labels, **options)
  File
/usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
 line 140, in evolve
database))
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
line 426, in mutate
return self.add_column(app_label, proj_sig, database)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
line 434, in add_column
self.field_attrs, model)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
line 33, in create_field
related_model_sig = proj_sig[related_app_name][related_model_name]
KeyError: 'site'


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Upgrade issues from 1.5.7 to 1.6.5

2012-04-23 Thread Christian Hammond
Hi Stephen,

Hmm, that's concerning. My upgrade simulations aren't reproducing that.

The same issue should be hit for any 1.6 release. 

Is this for the packages or FedoraHosted?

It almost sounds like the syncdb didn't set up the site app. We're there any 
warnings? Do you see those in the database?

Christian


On Apr 23, 2012, at 8:32, Stephen Gallagher step...@gallagherhome.com wrote:

 I'm getting the following error while trying to upgrade my 1.5.7 install
 to the newer 1.6.5 package during 'rb-site upgrade'.
 
 I am using django_evolution 0.6.7. This error is resulting in an outage
 situation, so I could really use some help quickly :(
 
 
  File /usr/bin/rb-site, line 9, in module
load_entry_point('ReviewBoard==1.6.5', 'console_scripts',
 'rb-site')()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 1760, in main
command.run()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 1650, in run
site.migrate_database()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 353, in migrate_database
self.run_manage_command(evolve, [--noinput, --execute])
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 469, in run_manage_command
execute_manager(reviewboard.settings, [__file__, cmd] + params)
  File
 /usr/lib/python2.6/site-packages/django/core/management/__init__.py,
 line 438, in execute_manager
utility.execute()
  File
 /usr/lib/python2.6/site-packages/django/core/management/__init__.py,
 line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
 /usr/lib/python2.6/site-packages/django/core/management/base.py, line
 191, in run_from_argv
self.execute(*args, **options.__dict__)
  File
 /usr/lib/python2.6/site-packages/django/core/management/base.py, line
 220, in execute
output = self.handle(*args, **options)
  File
 /usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
  line 60, in handle
self.evolve(*app_labels, **options)
  File
 /usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
  line 140, in evolve
database))
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
 line 426, in mutate
return self.add_column(app_label, proj_sig, database)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
 line 434, in add_column
self.field_attrs, model)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
 line 33, in create_field
related_model_sig = proj_sig[related_app_name][related_model_name]
 KeyError: 'site'
 
 
 -- 
 Want to help the Review Board project? Donate today at 
 http://www.reviewboard.org/donate/
 Happy user? Let us know at http://www.reviewboard.org/users/
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to 
 reviewboard+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Upgrade issues from 1.5.7 to 1.6.5

2012-04-23 Thread Stephen Gallagher
On Mon, 2012-04-23 at 11:25 -0700, Christian Hammond wrote:
 Hi Stephen,
 
 Hmm, that's concerning. My upgrade simulations aren't reproducing that.
 
 The same issue should be hit for any 1.6 release. 
 
 Is this for the packages or FedoraHosted?

This is happening from the RPMs I created for EPEL 6. They are identical
to the 1.6.5 sources except for three custom patches (attached). They
are minimally-invasive.

I also have a slightly unorthodox settings_local.py file (also attached,
portions redacted). This is because my patch for including other
apps/middleware is only in the 1.7 branch.

 It almost sounds like the syncdb didn't set up the site app. We're
 there any warnings? Do you see those in the database?

I'm not sure where to look for warnings and or what I need from the
database. Please clarify.


Slightly more complete output (this was with django_evolution 0.6.5):

[sgallagh@hosted03 conf]$ sudo rb-site upgrade /srv/reviewboard
Rebuilding directory structure
/usr/lib/python2.6/site-packages/django/db/__init__.py:60:
DeprecationWarning: Short names for ENGINE in database configurations
are deprecated. Prepend default.ENGINE with 'django.db.backends.'
  DeprecationWarning
Upgrading from version 1.5.7
Updating database. This may take a while.
Creating tables ...
Creating table accounts_localsiteprofile
Creating table attachments_fileattachment
Creating table reviews_fileattachmentcomment
Upgrading Review Board from 1.5.7 to 1.6.5
There are unapplied evolutions for sessions.
There are unapplied evolutions for accounts.
There are unapplied evolutions for reviews.
There are unapplied evolutions for scmtools.
Loading FAS groups...
FAS groups loaded. Don't forget to set FAS_USERNAME and FAS_PASSWORD to
a low-privilege account.
Adding baseline version for new models
Project signature has changed - an evolution is required
Installing custom SQL ...
Installing indexes ...
No fixtures found.
Registering new SCM Tool Plastic SCM
(reviewboard.scmtools.plastic.PlasticTool) in database
Traceback (most recent call last):
  File /usr/bin/rb-site, line 9, in module
load_entry_point('ReviewBoard==1.6.5', 'console_scripts',
'rb-site')()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 1760, in main
command.run()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 1650, in run
site.migrate_database()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 353, in migrate_database
self.run_manage_command(evolve, [--noinput, --execute])
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
line 469, in run_manage_command
execute_manager(reviewboard.settings, [__file__, cmd] + params)
  File
/usr/lib/python2.6/site-packages/django/core/management/__init__.py,
line 438, in execute_manager
utility.execute()
  File
/usr/lib/python2.6/site-packages/django/core/management/__init__.py,
line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
/usr/lib/python2.6/site-packages/django/core/management/base.py, line
191, in run_from_argv
self.execute(*args, **options.__dict__)
  File
/usr/lib/python2.6/site-packages/django/core/management/base.py, line
220, in execute
output = self.handle(*args, **options)
  File
/usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
 line 60, in handle
self.evolve(*app_labels, **options)
  File
/usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
 line 140, in evolve
database))
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
line 418, in mutate
return self.add_column(app_label, proj_sig, database)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
line 426, in add_column
self.field_attrs, model)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
line 33, in create_field
related_model_sig = proj_sig[related_app_name][related_model_name]
KeyError: 'site'

And again after updating to django_evolution 0.6.7 (to be sure):

[sgallagh@hosted03 conf]$ sudo rb-site upgrade /srv/reviewboard
Rebuilding directory structure
/usr/lib/python2.6/site-packages/django/db/__init__.py:60:
DeprecationWarning: Short names for ENGINE in database configurations
are deprecated. Prepend default.ENGINE with 'django.db.backends.'
  DeprecationWarning
Upgrading from version 1.6.5
Updating database. This may take a while.
Creating tables ...
There are unapplied evolutions for sessions.
There are unapplied evolutions for accounts.
There are unapplied evolutions for reviews.
There are unapplied evolutions for scmtools.
Loading FAS groups...
FAS groups loaded. Don't forget to set FAS_USERNAME and FAS_PASSWORD to
a low-privilege account.
Project signature has changed - an evolution is required
Installing custom SQL ...
Installing indexes ...
No fixtures found.
Traceback (most recent call last):
  File /usr/bin/rb-site, line 9, in module

Re: Upgrade issues from 1.5.7 to 1.6.5

2012-04-23 Thread Christian Hammond
It's your settings_local. Overriding that entirely is a recipe for disaster, as 
we add to that. If things are missing (the site app among a few in this case), 
things will blow up.

You probably should just dynamically take what's in there, convert to a list, 
and insert your models at one index before the last.

Christian



On Apr 23, 2012, at 11:36, Stephen Gallagher step...@gallagherhome.com wrote:

 On Mon, 2012-04-23 at 11:25 -0700, Christian Hammond wrote:
 Hi Stephen,
 
 Hmm, that's concerning. My upgrade simulations aren't reproducing that.
 
 The same issue should be hit for any 1.6 release. 
 
 Is this for the packages or FedoraHosted?
 
 This is happening from the RPMs I created for EPEL 6. They are identical
 to the 1.6.5 sources except for three custom patches (attached). They
 are minimally-invasive.
 
 I also have a slightly unorthodox settings_local.py file (also attached,
 portions redacted). This is because my patch for including other
 apps/middleware is only in the 1.7 branch.
 
 It almost sounds like the syncdb didn't set up the site app. We're
 there any warnings? Do you see those in the database?
 
 I'm not sure where to look for warnings and or what I need from the
 database. Please clarify.
 
 
 Slightly more complete output (this was with django_evolution 0.6.5):
 
 [sgallagh@hosted03 conf]$ sudo rb-site upgrade /srv/reviewboard
 Rebuilding directory structure
 /usr/lib/python2.6/site-packages/django/db/__init__.py:60:
 DeprecationWarning: Short names for ENGINE in database configurations
 are deprecated. Prepend default.ENGINE with 'django.db.backends.'
  DeprecationWarning
 Upgrading from version 1.5.7
 Updating database. This may take a while.
 Creating tables ...
 Creating table accounts_localsiteprofile
 Creating table attachments_fileattachment
 Creating table reviews_fileattachmentcomment
 Upgrading Review Board from 1.5.7 to 1.6.5
 There are unapplied evolutions for sessions.
 There are unapplied evolutions for accounts.
 There are unapplied evolutions for reviews.
 There are unapplied evolutions for scmtools.
 Loading FAS groups...
 FAS groups loaded. Don't forget to set FAS_USERNAME and FAS_PASSWORD to
 a low-privilege account.
 Adding baseline version for new models
 Project signature has changed - an evolution is required
 Installing custom SQL ...
 Installing indexes ...
 No fixtures found.
 Registering new SCM Tool Plastic SCM
 (reviewboard.scmtools.plastic.PlasticTool) in database
 Traceback (most recent call last):
  File /usr/bin/rb-site, line 9, in module
load_entry_point('ReviewBoard==1.6.5', 'console_scripts',
 'rb-site')()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 1760, in main
command.run()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 1650, in run
site.migrate_database()
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 353, in migrate_database
self.run_manage_command(evolve, [--noinput, --execute])
  File /usr/lib/python2.6/site-packages/reviewboard/cmdline/rbsite.py,
 line 469, in run_manage_command
execute_manager(reviewboard.settings, [__file__, cmd] + params)
  File
 /usr/lib/python2.6/site-packages/django/core/management/__init__.py,
 line 438, in execute_manager
utility.execute()
  File
 /usr/lib/python2.6/site-packages/django/core/management/__init__.py,
 line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
 /usr/lib/python2.6/site-packages/django/core/management/base.py, line
 191, in run_from_argv
self.execute(*args, **options.__dict__)
  File
 /usr/lib/python2.6/site-packages/django/core/management/base.py, line
 220, in execute
output = self.handle(*args, **options)
  File
 /usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
  line 60, in handle
self.evolve(*app_labels, **options)
  File
 /usr/lib/python2.6/site-packages/django_evolution/management/commands/evolve.py,
  line 140, in evolve
database))
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
 line 418, in mutate
return self.add_column(app_label, proj_sig, database)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
 line 426, in add_column
self.field_attrs, model)
  File /usr/lib/python2.6/site-packages/django_evolution/mutations.py,
 line 33, in create_field
related_model_sig = proj_sig[related_app_name][related_model_name]
 KeyError: 'site'
 
 And again after updating to django_evolution 0.6.7 (to be sure):
 
 [sgallagh@hosted03 conf]$ sudo rb-site upgrade /srv/reviewboard
 Rebuilding directory structure
 /usr/lib/python2.6/site-packages/django/db/__init__.py:60:
 DeprecationWarning: Short names for ENGINE in database configurations
 are deprecated. Prepend default.ENGINE with 'django.db.backends.'
  DeprecationWarning
 Upgrading from version 1.6.5
 Updating database. This may take a while.
 Creating tables ...
 There are unapplied 

Re: Upgrade issues from 1.5.7 to 1.6.5

2012-04-23 Thread Christian Hammond
Maybe I'm getting mixed up between 1.6.x and 1.7. It could be that we only
added site in 1.6.

We can get that change into 1.6.x. I was hesitant to make too many more
changes to 1.6.x, but we'll be doing a larger 1.6.x release hopefully this
week, so I'll try to remember to slip that one in.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Mon, Apr 23, 2012 at 11:46 AM, Stephen Gallagher 
step...@gallagherhome.com wrote:

 On Mon, 2012-04-23 at 11:41 -0700, Christian Hammond wrote:
  It's your settings_local. Overriding that entirely is a recipe for
  disaster, as we add to that. If things are missing (the site app among
  a few in this case), things will blow up.
 

 Eep, that's weird. I could have sworn I added the site app, but I
 somehow missed it. Guess that explains that. Thanks!

 You say among a few. Were there others that I missed that you see?

  You probably should just dynamically take what's in there, convert to a
  list, and insert your models at one index before the last.

 As noted, I submitted http://reviews.reviewboard.org/r/2630/ half a year
 ago, but it only made it to master (not 1.6.x). That would obviously be
 my preferred approach to this :)

 --
 Want to help the Review Board project? Donate today at
 http://www.reviewboard.org/donate/
 Happy user? Let us know at http://www.reviewboard.org/users/
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to
 reviewboard+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/reviewboard?hl=en


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: Upgrade issues from 1.5.7 to 1.6.5

2012-04-23 Thread Stephen Gallagher
On Mon, 2012-04-23 at 12:01 -0700, Christian Hammond wrote:
 Maybe I'm getting mixed up between 1.6.x and 1.7. It could be that we
 only added site in 1.6.
 
 We can get that change into 1.6.x. I was hesitant to make too many
 more changes to 1.6.x, but we'll be doing a larger 1.6.x release
 hopefully this week, so I'll try to remember to slip that one in.
 

Thanks for your help and quick replies. We're back up and running again
on Fedora Hosted. It's appreciated :)

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Upgrade issues from 1.5.7 to 1.6.5

2012-04-23 Thread Christian Hammond
On Mon, Apr 23, 2012 at 12:25 PM, Stephen Gallagher 
step...@gallagherhome.com wrote:

 On Mon, 2012-04-23 at 12:01 -0700, Christian Hammond wrote:
  Maybe I'm getting mixed up between 1.6.x and 1.7. It could be that we
  only added site in 1.6.
 
  We can get that change into 1.6.x. I was hesitant to make too many
  more changes to 1.6.x, but we'll be doing a larger 1.6.x release
  hopefully this week, so I'll try to remember to slip that one in.
 

 Thanks for your help and quick replies. We're back up and running again
 on Fedora Hosted. It's appreciated :)


Awesome, glad to hear it :)

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en