[09:50:09] Hi, [09:50:09] I'm trying to run a script that queries the number of different editors for an article (SELECT COUNT(DISTINCT rev_actor),rev_page FROM revision GROUP BY rev_page). I think that since the change to actors the table is much slower (now trying arwiki). It gets stuck. [09:51:41] I tried to use a timeout for the query in several ways (so I can later use a query that goes with batches) but the replica is not taking my timeout parameters. [12:12:31] !log tools.lexeme-forms deployed fe6cc3a79b (improved forms/senses message for duplicates) [12:12:33] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.lexeme-forms/SAL [16:41:10] !log tools.wdvd deployed 4fcb350920 (use _recentchanges views) [16:41:12] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.wdvd/SAL [16:52:06] Jayprakash12345: did your users already apply at https://toolsadmin.wikimedia.org/tools/membership/apply? I think we're up-to-date on approvals there. [16:56:55] andrewbogott: Yes, Thank you!! Now our all member have the access of toolsforge. [16:57:02] great :) [18:16:21] !log tools.lexeme-forms deployed 846100f8d9 (update Czech translations) [18:16:22] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.lexeme-forms/SAL [19:01:26] !log tools.lexeme-forms deployed 645886b3a8 (update German translations) [19:01:27] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.lexeme-forms/SAL [23:01:15] I wrote a simple tool in Python that requires the Python package mwclient [23:02:00] I hadn't used virtualenv before, but I got it to put an executable at env/bin/python3 that runs my CGI script directly [23:02:20] how do I get lighttpd to use that executable instead of the one in /usr/bin? [23:16:35] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#Default_uwsgi_configuration [23:25:27] I'm not sure that python cgi works the same way as the uwsgi setup... [23:27:26] ksft: if creating the venv in $HOME/www/python/venv does not work, file a phabricator task tagged with #toolforge & #documentation and assign to me. I can try to figure out what magic might work. Generally though cgi scripts are awkward and uwsgi apps are preferred for webservices [23:28:36] oh, that's not where it is [23:28:42] that might be my problem [23:30:22] I just looked up the default lighttpd config we generate and I don't think it will end up working with any venv :/ [23:30:42] when I run `webservice start', it serves the files in public_html [23:30:54] what's www? [23:30:55] has 'cgi.assign = (".py" => "/usr/bin/python")' in it [23:31:20] I tried changing the configuration so it would use the venv executable, but it didn't [23:31:52] ksft: is your tool only python, or are you mixing in php too? [23:32:01] just Python [23:32:38] ok. I would suggest writing it as a uwsgi app that runs on the kubernetes cluster then. [23:32:54] This tutorial may help you understand how to do that -- https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Flask_OAuth_tool [23:32:56] what are those things? [23:33:12] I don't need OAuth or Flask [23:33:21] it's a single file CGI script [23:34:02] understood, but our webservice setup is not designed to run python cgi scripts from a venv [23:34:36] UWSGI is a https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface container [23:35:34] WSGI is a python standard for web apps that is a lot more performant than the CGI spec [23:36:08] it basically runs the python interpreter all the time rather than starting from scratch for each request [23:36:39] that makes sense [23:36:40] You don't have to use Flask, but Flask is a very simple to use WSGI library for Python [23:37:32] The tutorial starts with a "hello world" before going on to explain the OAuth parts, so you can stop there [23:37:58] and then drop your CGI's logic into the basic Flask template [23:38:21] there should be lots of tutorials and docs for using Flask that you can find with a web search [23:40:38] all right, I think I can get it to work [23:40:51] thanks [23:50:15] why is it so difficult to move files and change ownership between my account and my tool account? [23:51:19] because the system we have is really horrible. :/ [23:51:28] I've noticed [23:51:48] does it really make sense for tool accounts to be separate? [23:52:25] yes, because we very much encourage multiple maintainers [23:52:26] I guess they need to be separate from users for tools with multiple maintainers, but why are they accounts? [23:52:41] why not just directories that the maintainers have permissions for? [23:53:30] separate users because a) that's how Coren built things in 2013 and b) that's about the only way to control access in a unix environment [23:54:09] In theory you should be able to scp/sftp files to your personal $HOME and then ssh in and mv them to the tool's $HOME [23:54:11] I don't know much about sysadmining, so I guess I shouldn't complain too much [23:54:36] your user and the tool user share a unix group [23:55:23] once the files are in the tool's $HOME you can `become ` and then `take ` to change the permissions so that the tool user owns the files [23:56:39] I don't think so [23:56:52] I couldn't do that yesterday until I chgrped the file [23:57:37] hmmm... that sounds buggy [23:59:12] * bd808 admits to not having used `take` on the new Stretch bastions