Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

#7926 closed defect (worksforme)

enhanced error during upgrade

Reported by: shanec@… Owned by: Remy Blank
Priority: normal Milestone:
Component: general Version: 0.11.2.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I wanted to know what plugin is failing during an upgrade, so I modified Environment.upgrade to give me that information via an exception. patch to follow.

Attachments (1)

trac-upgrade-exception.patch (820 bytes ) - added by anonymous 15 years ago.

Download all attachments as: .zip

Change History (4)

by anonymous, 15 years ago

comment:1 by Christian Boos, 15 years ago

Milestone: 0.12

Well, doing a commit after each partial upgrade seems wrong.

You should rather take note of the currently executing upgrade, then show the culprit when catching the exception, i.e. something like:

  module = None
  try:
      for participant in upgraders:
          module = participant.__module__.split('.')[0] 
          participant.upgrade_environment(db) 
      db.commit()
  except Exception, e:
      raise TracError("Unable to upgrade \"%s\": %s" % (module, e)) 

(untested)

comment:2 by Remy Blank, 15 years ago

Milestone: 0.12next-minor-0.12.x
Owner: set to Remy Blank

I'll implement comment:1, but probably not for 0.12.

comment:3 by Remy Blank, 14 years ago

Milestone: next-minor-0.12.x
Resolution: worksforme
Status: newclosed

Trunk now logs the current upgrade participant, and performs each upgrade in a separate transaction, so this is no longer an issue.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.