Last modified: 2014-03-18 23:44:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51058, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49058 - Support WSGI for Running Python Scripts
Support WSGI for Running Python Scripts
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-02 11:38 UTC by Yuvi Panda
Modified: 2014-03-18 23:44 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yuvi Panda 2013-06-02 11:38:01 UTC
Because WSGI is awesome. But more importantly a lot of Python tools already assume WSGI (flask, werkzeug, other middleware, etc) and people are a lot more familiar with WSGI than with CGI for python.
Comment 1 Yuvi Panda 2013-06-02 11:39:29 UTC
mod_wsgi (via https://code.google.com/p/modwsgi/) is probably the easiest way to do this.
Comment 2 Yuvi Panda 2013-06-02 11:40:20 UTC
Also see http://www.python.org/dev/peps/pep-0333/ for additional background info on WSGI
Comment 3 Peter Bena 2013-06-04 07:31:53 UTC
I can't do this major change on tools without discussing this with Coren. But I can install this to bots project for now
Comment 4 Peter Bena 2013-06-15 19:51:38 UTC
bumping priority - waiting for Coren's opinion
Comment 5 Marc A. Pelletier 2013-06-15 22:20:23 UTC
I've found a fairly reasonable way of doing it.  Will implement a test version next week.
Comment 6 Yuvi Panda 2013-07-08 21:42:37 UTC
Update from IRC: mod_wsgi is no go. However, Coren is currently working on a uwsgi emperor/tyrant based server that should be much, much better than mod_wsgi :)
Comment 7 Yuvi Panda 2013-10-01 19:37:02 UTC
Another update: Tyrant is also a no go, but the Dynamic HTTP Proxy I built should be able to eventually solve this
Comment 8 Robin Krahl 2013-10-01 19:38:29 UTC
I would really appreciate having WSGI support on Tool Labs. Due to a bug in werkzeug [0], I am not able to deploy a tool using flask at the moment.

[0] https://github.com/mitsuhiko/flask/issues/857
Comment 9 Merlijn van Deen (test) 2013-11-28 19:44:32 UTC
Gerrit Patch Uploader is using newweb with flup.server.fcgi as wsgi host. For details, please see the lighttpd conf at

https://github.com/valhallasw/gerrit-patch-uploader/blob/master/lighttpd.conf

and the fcgi script at

https://github.com/valhallasw/gerrit-patch-uploader/blob/master/app.fcgi


(lighttpd.conf should be in your project's home directory, and requests to that directory will then be served by your own lighttpd -- see https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help/NewWeb )
Comment 10 Yuvi Panda 2013-11-28 19:47:35 UTC
Update on the Dynamic HTTP Proxy: The features required to make it work for toollabs has been built and merged. Only waiting on Coren to update portgrabber / portgranter so that it supports the new protocol. 

*Worst* case scenario is that this happens when we move to eqiad (since the current webproxy setup isn't puppetized :D). I hope to have it running in production in a couple weeks though.
Comment 11 Andre Klapper 2014-02-18 13:14:33 UTC
Petr: This ticket has been assigned to you and in ASSIGNED state for more than 12 months. Do you plan to work on this, or could you reset to NEW status and/or default assignee, if not?
Comment 12 Tim Landscheidt 2014-03-18 23:44:19 UTC
My understanding of Merlijn's comment #9 is that NewWeb supports this, and with no Apaches in eqiad, all tools can use this, so closing this bug as fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links