Modify

Opened 8 years ago

Closed 8 years ago

#12784 closed defect (fixed)

PeerReview: running upgrade db2 - Failed

Reported by: charles.carbaj@… Owned by: Cinc-th
Priority: high Component: PeerReviewPlugin
Severity: major Keywords:
Cc: Trac Release: 1.0

Description

My trac server specs:
Trac 1.0.1
Python 2.7.3 (default, Feb 27 2014, 20:09:21) [GCC 4.6.3]
MySQL server: "5.5.40-0ubuntu0.12.04.1", client: "5.5.47"

Installed PeerReviewPlugin, when Trac states "TracError: The Trac Environment needs to be upgraded." I run "trac-admin /var/www/path to trac env/zyx upgrade"

I get:
PeerReview: running upgrade db2 The upgrade failed. Please fix the issue and try again. OperationalError: (1050, "Table 'peer_review' already exists")

Dropping the said table, re-run upgrade, I get:
PeerReview: running upgrade db2 The upgrade failed. Please fix the issue and try again. TypeError: 'NoneType' object has no attribute 'getitem'

Re-run upgrade again, I get:
PeerReview: running upgrade db2 The upgrade failed. Please fix the issue and try again. OperationalError: (1050, "Table 'peer_review' already exists")

Basically, an infinite loop from here.. Please advice. Thanks!

Attachments (0)

Change History (12)

comment:1 Changed 8 years ago by Cinc-th

Use the current trunk version of the plugin.

Before running the upgrade make sure you don't have broken tables left from you attempts. Best bet is to use your backup copy.

comment:2 Changed 8 years ago by anonymous

Thanks for the quick reply. I recovered old db, removed the plugin, installed trunk version of plugin, got to the trac upgrade env command and got:

The upgrade failed. Please fix the issue and try again.
TracError: Upgrade for database version 1 not supported. Raise a ticket for PeerReviewPlugin for a fix

comment:3 in reply to:  1 Changed 8 years ago by charles.carbaj@…

Replying to Cinc-th:

Use the current trunk version of the plugin.

Before running the upgrade make sure you don't have broken tables left from you attempts. Best bet is to use your backup copy.


I recovered old db, so no broken tables, removed the old plugin, installed trunk version of plugin, got to the trac upgrade env command and got:

The upgrade failed. Please fix the issue and try again. TracError: Upgrade for database version 1 not supported. Raise a ticket for PeerReviewPlugin for a fix

comment:4 Changed 8 years ago by Cinc-th

That looks more like it. I don't suppose you have such an old version of PeerReviewPlugin preinstalled.

You have to remove the entry codereview_version from the system data base table. It shouldn't be there if it's clean install.

If that one is from another plugin drop me a note. It means there is a name clash which should be accounted for in the upgrade process.

comment:5 in reply to:  4 Changed 8 years ago by charles.carbaj@…

Replying to Cinc-th:

That looks more like it. I don't suppose you have such an old version of PeerReviewPlugin preinstalled.

You have to remove the entry codereview_version from the system data base table. It shouldn't be there if it's clean install.

If that one is from another plugin drop me a note. It means there is a name clash which should be accounted for in the upgrade process.


I removed a similar name "coderev" from System db, re-ran the Trac env upgrade and worked! Thanks a bunch Cinc-th! Much appreciated :)

comment:6 Changed 8 years ago by Cinc-th

You're welcome. I suppose the entry is from another plugin?

comment:7 in reply to:  6 ; Changed 8 years ago by charles.carbaj@…

Replying to Cinc-th:

You're welcome. I suppose the entry is from another plugin?


I did previously try this plugin: CodeReviewPlugin , but no success, then I tried PeerReview plugin, and saw the above errors. PeerReview plugin is working on my test Trac environment. Time to deploy to the production Tracs. Thanks again!

Last edited 8 years ago by Ryan J Ollos (previous) (diff)

comment:8 in reply to:  7 Changed 8 years ago by Ryan J Ollos

Replying to charles.carbaj@…:

I did previously try this plugin: CodeReviewPlugin , but no success, then I tried PeerReview plugin, and saw the above errors.

CodeReviewPlugin hasn't been maintained in quite a while, so I'm not surprised you encountered issue. PeerReviewPlugin and CodeReviewerPlugin appear to be the only code review tools that are maintained.

comment:9 in reply to:  7 ; Changed 8 years ago by Cinc-th

Replying to charles.carbaj@…:

Replying to Cinc-th:

You're welcome. I suppose the entry is from another plugin?


I did previously try this plugin: CodeReviewPlugin , but no success, then I tried PeerReview plugin, and saw the above errors.

I see.

PeerReview plugin is working on my test Trac environment. Time to deploy to the production Tracs. Thanks again!

Be aware that the plugin currently only works with the default repository. And there may be quite a few rough edges...

comment:10 in reply to:  9 Changed 8 years ago by charles.carbaj@…

Replying to Cinc-th:

Be aware that the plugin currently only works with the default repository. And there may be quite a few rough edges...

Oh, Ok, noted. I will update this ticket once I get around to deploying for our other tracs. Possibly in a week. Thanks.

comment:11 Changed 8 years ago by Cinc-th

Forgot to reference this ticket in changeset [15557] so here comes the information.

In [15557] a new upgrade mechanism was introduced:

  • Create database tables directly for first time installs instead of performing each upgrade step. This fails for backends other than SQLite.
  • don't try to upgrade ancient versions of the plugin. If you use such a version create a support ticket.

This should fix the database upgrade problems for new users. I don't think there are any users of old releases left after all these years.

comment:12 Changed 8 years ago by Cinc-th

Resolution: fixed
Status: newclosed

In 15576:

PeerReviewPlugin: remove unused upgrade code obsoleted by [15557].

Fixes #12784

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Cinc-th.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.