Modify

Opened 10 years ago

Closed 9 years ago

#12409 closed defect (worksforme)

Upgrading is Unstable

Reported by: robert@… Owned by: Cinc-th
Priority: normal Component: MultipleWorkflowPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I think the new version of the MultipleWorkflowPlugin is absolutely stonkingly brilliant -- thanks and congratulations. But I've had a frightful time upgrading from the earlier version.

Details in the first comment.

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by anonymous

I have half a dozen production trac projects/installations, and one "sandbox" one for testing/development. The production projects all have minimal trac.ini files which essentially just identify the project "inherit" a common ".ini" file (and through that common plugins and templates directories. The "sandbox" has its own trac.ini which is (meant to be) very similar to the shared one. And it has its own templates and plugins directories.

All these projects have been running the old/original version of MultipleWorkflowPlugin for a couple of years.

When I realised that there was a version of the plugin that would cope with a user changing a ticket type to one that was inconsistent with its state, I decided to upgrade. This was Not At All Easy.

Upgrading the "sandbox" project was painless. The "plugins" directory contained two files from August 2013: MultipleWorkflowPlugin.py and MultipleWorkflowPlugin.pyc.

I downloaded the zip file, followed the instructions and ran python setup.py bdist_egg to create a .egg file, and then placed this in the sandbox plugins directory, in place of the ".py" and ".pyc" files. I restarted HTTP, and then browsed and modified tickets in the "sandbox" installation. All totally wonderful. Really happy.

So I went to the plugins directory used by all the production installations, and did the same thing there -- i.e. removed the ".py" and ".pyc" files, and replaced them with the ".egg" I had created, and then restarted HTTPD.

This broke track in all those installations. Completely. It would not do anything at all. Accessing any page (ticket details, wiki page, admin -- anything) just produced an error screen, saying

Cannot find implementation(s) of the ITicketActionController interface named MultipleWorkflowPlugin. Please check that the Component is enabled or update the option [ticket] workflow in trac.ini.

Nothing like this had happened in the Sandbox: that had "just worked". Baffled, I put the ".py" and ".pyc" files back (alongside the ".egg", and restarted HTTPD. Now, Trac worked, and in particular I could go to the "Admin" -> "Plugins" page. This showed that I had "MultipleWorkflowPlugin 1.1.0" installed (just as I had in the sandbox). But whereas in the Sandbox it had two sub-components, here it had three. Two of which were disabled. There was no "Workflows" entry in the "Ticket System" menu. When I enabled the two extra components (restarted HTTPD and reloaded), the "Workflows" entry appeared.

From this state, I tried removing the ".pyc" and ".py" files. Trac continued to work, only now the plugin had only two sub-components.

When I investigated, I noticed that enabling the extra components had added two lines to the installations ".ini" file:

multipleworkflow.web_ui.multipleworkflowadminmodule = enabled
multipleworkflow.workflow.multipleworkflowplugin = enabled

Removing these lines from the installation's ".ini" broke trac until I added them to the shared ".ini".

Prior to the upgrade, both the shared ".ini" file and the one in the "sandbox" installation had contained the following:

multipleworkflowplugin.* = enabled
multipleworkflowplugin.multipleworkflowplugin.multipleworkflowplugin = enabled

But while those lines were sufficient for the sandbox, the "production" projects will not run without the two new lines.

I don't understand why this should be, but I fear others will lose a lot of time upgrading unless you can get to the bottom of it, or at least provide some update instructions.

comment:2 Changed 10 years ago by Cinc-th

It may be you have some mix of old and new plugin versions.

Please check if there are no *.py and *.pyc (or *.egg) files of your old installation are left in any plugin dir of any of your projects. (I assume you use a central plugin directory inherited by all Trac environments).

Depending on your setup of multiple Trac instances the first found *.py/*.egg is loaded when opening a project and used for the rest of the projects no matter if there is another plugin version in the local plugin directory or the global plugin directory.

The extra lines are normal behaviour when manually enabling/disabling components from the trac admin page. In any case

[components]
multipleworkflowplugin.* = enabled

should be sufficient to enable all parts of the plugin.

comment:3 Changed 9 years ago by Cinc-th

Resolution: worksforme
Status: newclosed

No feedback. Issue seems to be resolved.

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.