[14:00:08] Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:50:06] Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @tgr & @Tonina_WMDE - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [15:00:43] Hey everyone \o Me and @tgr are here to answer your questions in this week's Technical Advice IRC Meeting [15:01:00] hi all! [15:01:49] Hi there! [15:03:21] Is it possible to ask a question with toolforge too? [15:03:54] I mean running bots and processes. [15:04:15] ato_01: all questions are welcome [15:04:16] ato_01: anything is possible! the worst that can happen is that we can't answer [15:04:30] Super. [15:06:07] In the near past I could run python scripts through shell scripts through php post, [15:06:26] o/ [15:06:47] And now I can only let run shell scripts to delete my logs [15:07:16] I do not receive any error [15:08:13] but my post request does not work. Do you know, why? [15:08:44] o/ [15:08:57] ato_01: so you are saying you have a PHP web application, you send a POST request to it, and the application executes a Python script via a shell command? And that has stopped working recently? [15:09:18] yes, exactly [15:09:58] do you have logging in the PHP code? such as return status from shell_exec or whatever you use? [15:10:35] ato_01: can you paste the post request you send [15:10:39] No, I can not log in php. [15:10:58] All I can do, only send a post request [15:11:17] maybe you can help in it [15:11:39] just a sec [15:11:50] cannot meaning that the application has logging code but it does not actually write anything to the logs? or that you are not sure how to set it up? [15:14:59] in the meantime, if anyone else has questions, feel free to ask, IRC works well for multiple parallel discussions [15:15:19] I just sent a post request, like this [15:15:24]
[15:15:47] It has run a shell script [15:17:13] which started a jsub command with a python script, which has a -o (log output) parameter [15:18:11] and it was working befor this year for sure [15:18:44] ato_01: ok so what is the expected result in the end? logs being deleted? [15:18:50] now all I can do with a shell script is to clear all my log files [15:19:45] I still would like to let run or stop in case of emergency [15:20:13] through web browser, without putty [15:20:48] ato_01: can you somehow show us the contents of test-1.php [15:21:10] [15:22:04] And it is almost the same where I clear my log files. [15:28:45] ato_01: but clearing the log files works, right? The problem is in the python script or more precisely that it's not executed? [15:29:02] clearing still works [15:30:12] only python scripts (or jsub commands) what I can not any more [15:30:37] hmmm [15:31:05] clearing is not more. Only the following: [15:31:16] #!/bin/bash echo "" > /data/project/ato/public_html/log/test-1.txt [15:32:30] ato_01: probably the first step is to check the job grid error logs [15:33:18] yes, but I can not find anithing like this [15:33:32] probably with qstat, I'm not really familiar with the grid system though [15:34:17] so maybe its better to hop over to #wikimedia-cloud and ask there [15:34:52] ok [15:34:58] I will do that [15:36:05] I am just seeing my error.log [15:36:11] ./scripts/test-1.sh: line 2: jsub: command not found [15:36:47] But the same shell script through putty works [15:38:14] the web app might be using a different user or different shell [15:38:37] you can try using the full path to jsub [15:39:07] do you know the full path of it? [15:40:41] /usr/bin/jsub [15:41:08] Thank you! I will try it [15:45:20] anyone else? :) [15:45:56] ato_01: triggering pywikibot jobs from a web interface seems like a common enough use case so it might be worth asking about that on the Cloud IRC or mailing list, they might suggest best practices or sample code [15:46:03] ./scripts/test-1.sh: line 2: /usr/bin/jsub: No such file or directory [15:46:35] for example, sending the output of jsub to devnull might also set you up for trouble in the long run [15:47:56] maybe the web user has limited access? [15:49:15] if the task is not time-sensitive you could rearrange it so that the PHP script just pushes into some simple queue (a DB or text file) and a periodically scheduled grid job takes the tasks from there [15:49:48] but I'm just guessing, you should ask people more familiar with toolforge [15:52:24] It should be some security update in the near past. I will ask somebody on the toolforge channel. Thank you anyway! [15:59:53] sorry we couldn't be of more help [16:00:04] :/ [16:00:34] no problem. you tried it. :) [16:00:44] have a nice evening! [16:04:42] this concludes the tech advice hour, there will be one the same time next week [16:05:57] also since next Wednesday is first of the month, there will be an Americas-friendly second meeting at 11 PM UTC [16:06:11] o/ [16:56:18] <[1997kB]> Hello, why there's no join date on these user pages https://en.m.wikipedia.org/w/index.php?title=User:Shoy https://meta.m.wikimedia.org/wiki/User:FloNight in mobile view like this one https://en.m.wikipedia.org/wiki/User:1997kB below username? [16:59:03] MariaDB [enwiki_p]> select user_name, user_registration from user where user_name in ('Shoy', 'FloNight', '1997kB'); [16:59:03] +-----------+-------------------+ [16:59:04] | user_name | user_registration | [16:59:04] +-----------+-------------------+ [16:59:04] | 1997kB | 20170802154554 | [16:59:05] | FloNight | 20051011002941 | [16:59:07] | Shoy | NULL | [16:59:09] +-----------+-------------------+ [16:59:11] 3 rows in set (0.00 sec) [17:00:17] oh, FloNight's link is metawiki, not enwiki [17:00:41] MariaDB [metawiki_p]> select user_registration from user where user_name = 'FloNight'; [17:00:42] +-------------------+ [17:00:42] | user_registration | [17:00:42] +-------------------+ [17:00:46] | NULL | [17:00:48] +-------------------+ [17:00:50] 1 row in set (0.00 sec) [17:00:57] [1997kB], yeah basically if there is no user_registration timestamp it won't show that line [17:01:07] <[1997kB]> and why is that? [17:01:17] why might user_registration be NULL? [17:01:28] Well the field hasn't always existed [17:02:49] <[1997kB]> oh so when these accounts were created there was no user registration field? [17:02:51] it was added in MW 1.6 [17:02:54] yeah [17:03:00] the docs for that table literally say [17:03:05] "For old users, they may have a value of NULL for this field." [17:03:24] <[1997kB]> but it doesn't happen with old users? [17:03:29] <[1997kB]> all old* [17:03:31] https://www.mediawiki.org/wiki/Manual:User_table#user_registration [17:03:42] [1997kB], some are older than others [17:07:48] <[1997kB]> aha. got it.. Thanks Krenair :) [17:10:51] http://mediawiki.org/wiki/Special:Code/MediaWiki/12207 [17:13:31] [1997kB], actually enwiki does appear to have had some back-filled [17:13:38] MariaDB [enwiki_p]> select min(user_registration) from user; [17:13:39] +------------------------+ [17:13:39] | min(user_registration) | [17:13:39] +------------------------+ [17:13:39] | 20010121021221 | [17:13:40] +------------------------+ [17:13:41] 1 row in set (51.06 sec) [17:13:48] just not all [17:13:51] * Krenair shrugs [17:14:44] Bugzilla was a thing by this point so you may be able to find a ticket for it [18:02:11] [1997kB]: enwp had user_registration backfilled, but I don't think any other wiki had [18:08:11] <[1997kB]> legoktm: but it still doesn't show in some enwiki accounts, one is above. [18:09:23] The back-fill was just a lie, right? We put in the date of first edit. [18:09:36] * James_F has vague memories. [18:10:51] correct [19:17:17] James_F, legoktm: so maybe it missed those who registered before registration started getting recorded but had not edited before the backfill? [19:18:10] Yeah, and accounts registered in ~2003 which were never used to edit are still `null`. [19:18:38] Also the script whoever wrote might have died due to a hiccough. [19:24:36] James_F, hm? [19:24:40] the script whoever wrote? [19:24:53] I think Tim Starling wrote the backfill script [19:25:17] OK. [19:57:46] there's a task somewhere about running it for the rest of the wikis [19:58:08] I remember looking into this during SULF