Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12063 closed defect (cantfix)

Plugins being loaded globally

Reported by: Phillip Leder <phillip.leder@…> Owned by:
Priority: high Milestone:
Component: general Version: 1.0.2
Severity: normal Keywords: plugin
Cc: phillip.leder@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Jun Omae)

The Trac-plugin management currently breaks a Trac system consisting of multiple Trac instances for me. While I think the current problem could be fixed by the plugin maintainer, as it didn't occur until a plugin update recently, there is still something very wrong with the management. A plugin that breaks another Trac instance even though it isn't enabled for that instance? That's very bad.

To be more precise: The TimingAndEstimationPlugin breaks the export of custom queries as comma/tab seperated tables. The stacktrace lists the TimingAndEstimationPlugin as the cause, but proceeds with the Enabled Plugins listing, where the TimingAndEstimationPlugin does not show up as seen here:

Oops… Trac detected an internal error:

NameError: global name 'web_context' is not defined

This is probably a local installation issue. Found a bug in Trac?

If you think this should work and you can reproduce the problem, you should consider creating a bug report.

Note that the TracCustomFieldAdmin plugin seems to be involved. Please report this issue to the plugin maintainer.

Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac or its plugins, please try the mailing list instead of creating a ticket.

Otherwise, please a new bug report describing the problem and explain how to reproduce it.

Python Traceback
Most recent call last:

    File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 512, in _dispatch_request
    File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 221, in dispatch
    File "/usr/lib/python2.7/dist-packages/trac/ticket/query.py", line 979, in process_request
    File "/usr/lib/python2.7/dist-packages/trac/mimeview/api.py", line 1022, in send_converted
    File "/usr/lib/python2.7/dist-packages/trac/mimeview/api.py", line 697, in convert_content
    File "/usr/lib/python2.7/dist-packages/trac/ticket/query.py", line 875, in convert_content
    File "build/bdist.linux-x86_64/egg/timingandestimationplugin/tande_filters.py", line 58, in new_csv_export

System Information:

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.6.0
Trac 	1.0.2
Babel 	1.3
CustomFieldAdmin 	0.2.6
Docutils 	0.12
Genshi 	0.7 (with speedups)
mod_python 	3.3.1
psycopg2 	2.5.4
Pygments 	2.0.1
Python 	2.7.9 (default, Mar 1 2015, 13:01:26) [GCC 4.9.2]
pytz 	2012c
setuptools 	5.5.1
Subversion 	1.8.10 (r1615264)
jQuery	1.7.2
jQuery UI	1.10.1
jQuery Timepicker	1.2
Enabled Plugins:
AutocompleteUsers 	0.4.2dev-r13962 	/usr/local/lib/python2.7/dist-packages/AutocompleteUsers-0.4.2dev_r13962-py2.7.egg
DefaultCc 	0.3dev-r13747 	/usr/local/lib/python2.7/dist-packages/DefaultCc-0.3dev_r13747-py2.7.egg
RoadmapHours 	0.5 	/usr/local/lib/python2.7/dist-packages/RoadmapHours-0.5-py2.7.egg
TracCustomFieldAdmin 	0.2.6 	/usr/lib/python2.7/dist-packages

This is a major problem as I now have to choose between several Trac instances to work while willingly breaking the other instances.

Attachments (0)

Change History (4)

comment:1 by Phillip Leder <phillip.leder@…>, 9 years ago

Cc: phillip.leder@… added

comment:2 by Jun Omae, 9 years ago

Description: modified (diff)
Resolution: cantfix
Status: newclosed

comment:3 by Phillip Leder <phillip.leder@…>, 9 years ago

As I said: I believe the plugin could be fixed by the maintainer (though I did not see that he already did - that is on me), but it is still is a major problem that this happens at all.

Do you really think it is fine that a plugin breaks a Trac instance where the plugin isn't even active?

comment:4 by Jun Omae, 9 years ago

That method to fix in the plugin, monkey patch, is absolutely wrong.

Even if a component is active/inactive, the component is always loaded. A python interpreter in web server is single and shared in all Trac environments. Therefore, any plugins can break Trac by monkey patch in inactive components.

Another way, try to separate process with the plugin and other processes without the plugin using WSGIDaemonProcess in mod_wsgi if you need.

Anyway, shouldn't use monkey patch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.