Migration from 1.2.3 to 1.4

257 views
Skip to first unread message

Mo

unread,
Nov 14, 2019, 5:31:28 AM11/14/19
to Trac Users
After update from 1.2.3 to 1.4 the upgrade fails:

2019-11-14 11:25:31,184 Trac[web_ui] DEBUG: Ticketsboard: assignReviewer plugin part is present
2019-11-14 11:25:31,184 Trac[tracpm] INFO: Initializing TracPM
2019-11-14 11:25:31,195 Trac[api] INFO: Need to upgrade database_version from 41 to 45
2019-11-14 11:25:31,195 Trac[env] WARNING: Component <Component trac.db.api.DatabaseManager> requires an environment upgrade
2019-11-14 11:25:31,199 Trac[api] INFO: Need to upgrade database_version from 41 to 45
2019-11-14 11:25:31,199 Trac[env] WARNING: Component <Component trac.db.api.DatabaseManager> requires an environment upgrade
2019-11-14 11:25:31,199 Trac[api] INFO: Need to upgrade database_version from 41 to 45
2019-11-14 11:25:31,252 Trac[env] ERROR: Component <Component componentdependencies.componentdependency.ComponentDependencyPlugin> failed with
Traceback (most recent call last):
 
File "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/env.py", line 387, in component_guard
   
yield
 
File "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/env.py", line 773, in upgrade
   
if participant.environment_needs_upgrade():
TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)
2019-11-14 11:25:31,304 Trac[console] ERROR: Exception in trac-admin command: u'upgrade'
Traceback (most recent call last):
 
File "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/admin/console.py", line 83, in onecmd
    rv
= cmd.Cmd.onecmd(self, line) or 0
 
File "/usr/lib64/python2.7/cmd.py", line 220, in onecmd
   
return self.default(line)
 
File "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/admin/console.py", line 252, in default
   
return self.cmd_mgr.execute_command(*args)
 
File "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/admin/api.py", line 135, in execute_command
   
return f(*fargs)
 
File "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/env.py", line 1062, in _do_upgrade
   
self.env.upgrade(backup=no_backup is None)
 
File "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/env.py", line 773, in upgrade
   
if participant.environment_needs_upgrade():
TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)

The command was:
$ trac-admin /mnt/data/trac/projects/trac-pp/ upgrade
The upgrade failed. Please fix the issue and try again.

TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)

What is wrong about the command, does the API have changed?
I also migrated from a root installed trac to the pip installation inside the user home.

Best regards.

Jun Omae

unread,
Nov 14, 2019, 5:44:56 AM11/14/19
to trac-...@googlegroups.com
On Thu, Nov 14, 2019 at 7:31 PM Mo <burcheri...@gmail.com> wrote:
> 2019-11-14 11:25:31,252 Trac[env] ERROR: Component <Component componentdependencies.componentdependency.ComponentDependencyPlugin> failed with

That's a ComponentDependencyPlugin issue. The plugin is currently not
maintained. [1]
Try to remove the plugin.

> What is wrong about the command, does the API have changed?
> I also migrated from a root installed trac to the pip installation inside the user home.

Yes. API changes in r14888, #11901 [2] [3].

[1] https://trac-hacks.org/wiki/ComponentDependencyPlugin
[2] https://trac.edgewall.org/changeset/14888
[3] https://trac.edgewall.org/ticket/11901

--
Jun Omae <jun...@gmail.com> (大前 潤)

RjOllos

unread,
Nov 17, 2019, 3:07:30 PM11/17/19
to Trac Users
Untested changes to make it compatible with Trac 1.4:

- Ryan

Mo

unread,
Nov 18, 2019, 4:38:17 AM11/18/19
to Trac Users
Am Sonntag, 17. November 2019 21:07:30 UTC+1 schrieb RjOllos:
Untested changes to make it compatible with Trac 1.4:

Thanks. componentdependencyplugin is loading, no further testing yet.


The next issue with the 1.4 migration:
The button for ticket cloning has disappeared. I have TRAC_ADMIN permission so the permission should be sufficient.

Best regards.

RjOllos

unread,
Nov 18, 2019, 10:42:41 AM11/18/19
to Trac Users
Ticket clone is an optional component. Please make sure it is enabled and loading:
DEBUG: Loading plugin "tracopt.ticket.clone" 


Second, please check the browser console for errors, and check the page source to determine if '/chrome/ticketopt/ticketclone.js' is added to the page.


- Ryan

Mo

unread,
Nov 19, 2019, 8:33:11 AM11/19/19
to Trac Users
Am Montag, 18. November 2019 16:42:41 UTC+1 schrieb RjOllos:

Ticket clone is an optional component. Please make sure it is enabled and loading:
DEBUG: Loading plugin "tracopt.ticket.clone" 

2019-11-19 14:25:49,510 Trac[loader] DEBUG: Loading plugin "tracopt.ticket.clone" from "/mnt/data/trac/.local/lib64/python2.7/site-packages"

Second, please check the browser console for errors, and check the page source to determine if '/chrome/ticketopt/ticketclone.js' is added to the page.

The page source does not have any "ticketclone" string.
Web developer -> Web console, I can't see any errors when reloading the ticket page.
In the debugger I see some .js files but no ticketclone.js.

- Mo

Ryan Ollos

unread,
Nov 19, 2019, 9:58:07 AM11/19/19
to Trac Users
On Tue, Nov 19, 2019 at 5:33 AM Mo <burcheri...@gmail.com> wrote:
Am Montag, 18. November 2019 16:42:41 UTC+1 schrieb RjOllos:

Ticket clone is an optional component. Please make sure it is enabled and loading:
DEBUG: Loading plugin "tracopt.ticket.clone" 

2019-11-19 14:25:49,510 Trac[loader] DEBUG: Loading plugin "tracopt.ticket.clone" from "/mnt/data/trac/.local/lib64/python2.7/site-packages"

Please make sure the plugin is enabled in trac.ini for through the  General > Plugin webadmin page.

- Ryan

Mo

unread,
Nov 19, 2019, 11:00:45 AM11/19/19
to Trac Users
Am Dienstag, 19. November 2019 15:58:07 UTC+1 schrieb RjOllos:

Please make sure the plugin is enabled in trac.ini for through the  General > Plugin webadmin page.

I got to the root of the issue and found some old residuals: I was using  trac_NewTicketLikeThisPlugin-0.2-py2.7.egg with

[newticketlikethis]
derived_fields
= $ticket.summary (cloned)->summary                                                                                                        
excluded_fields
= reporter
ticket_clone_permission
= TICKET_CREATE
ticket_cloner
= DerivedFieldsTicketCloner

Reading that the used DerivedFieldsTicketCloner is based on Genshi I disabled that plugin and re-enabled tracopt.ticket.clone.ticketclonebutton.
Some time before I tried to have some custom cloning the adds the cloned ticket number somewhere in the clone. Now I see the default already adds some "Cloned from #..." to the description.
At least a basic clone is possible now. Is NewTicketLikeThisPlugin maintained for

RjOllos

unread,
Nov 19, 2019, 11:14:46 AM11/19/19
to Trac Users
You'd have to ask the plugin maintainer whether it will be maintained for Trac 1.4+.

What features does the NewTicketLikeThisPlugin provide that aren't available in Trac 1.4? 

Mo

unread,
Nov 19, 2019, 11:27:09 AM11/19/19
to Trac Users
Am Dienstag, 19. November 2019 17:14:46 UTC+1 schrieb RjOllos:

What features does the NewTicketLikeThisPlugin provide that aren't available in Trac 1.4? 

Good question. I hoped I can configure which fields to clone and which not. And to configure a template for adding the #parent_ticket id somewhere, preferably to "Parent ticket" field from SubTicketsPlugin, making the cloned ticket a child.

But even the DerivedFieldsTicketCloner that I used is not documented in the wiki at all. But the https://github.com/trac-hacks/trac-NewTicketLikeThisPlugin has a better documentation about it.

Mo

unread,
Nov 19, 2019, 11:32:02 AM11/19/19
to Trac Users
Am Dienstag, 19. November 2019 17:27:09 UTC+1 schrieb Mo:

 But the https://github.com/trac-hacks/trac-NewTicketLikeThisPlugin has a better documentation about it.
Reply all
Reply to author
Forward
0 new messages