[00:01:50] (03PS15) 10Lokal Profil: Restructure missing_commonscat_links [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/380060 (https://phabricator.wikimedia.org/T176528) [00:04:07] (03CR) 10Lokal Profil: "Broke this down in a few commits. But you can diff against patch set 13 to get the real (small) changes since your review" (033 comments) [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/380060 (https://phabricator.wikimedia.org/T176528) (owner: 10Lokal Profil) [00:47:14] (03PS6) 10Lokal Profil: Make statistics table for unknown fields [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/390169 [00:48:31] (03CR) 10jerkins-bot: [V: 04-1] Make statistics table for unknown fields [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/390169 (owner: 10Lokal Profil) [00:49:08] (03PS3) 10Lokal Profil: Re-factor statistics bit of unused_monument_images [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/447109 (https://phabricator.wikimedia.org/T176528) [00:57:13] (03PS7) 10Lokal Profil: Make statistics table for unknown fields [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/390169 [01:07:20] (03PS8) 10Lokal Profil: Make statistics table for unknown fields [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/390169 [08:32:37] (03CR) 10Lokal Profil: Make statistics table for unknown fields (031 comment) [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/390169 (owner: 10Lokal Profil) [08:35:02] (03CR) 10Lokal Profil: Re-factor statistics bit of unused_monument_images (031 comment) [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/447109 (https://phabricator.wikimedia.org/T176528) (owner: 10Lokal Profil) [08:40:46] (03CR) 10Lokal Profil: Move get_id_from_sort_key to common in preparation for re-use (031 comment) [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/447107 (owner: 10Lokal Profil) [11:01:03] *newbie alert*: I'd like to learn wiki syntax using personal wiki software on my windows 10, that is easy to setup and run. Can anyone recommend software for me? [12:48:40] (03PS3) 10Ricordisamoa: Merge half-life query into general nuclides query [labs/tools/ptable] - 10https://gerrit.wikimedia.org/r/337251 [13:03:21] (03CR) 10Ricordisamoa: "I'm seeing slight differences in the graph with this patch applied. E.g. Q18845940 changes from "1 - 10 s" to "10^3 - 10^6 s" half-life. T" [labs/tools/ptable] - 10https://gerrit.wikimedia.org/r/337251 (owner: 10Ricordisamoa) [13:21:43] Hi, I'm trying to run PHP5.6 (or 7) on the WMFLabs server, but php -v says that only 5.5.9 is installed [13:22:12] I know that it's possible to run php5.6, which I require for constant arrays, but can't work out how to access it. Any suggestions are welcome! [13:22:29] !help [13:22:29] Smith609: If you don't get a response in 15-30 minutes, please create a phabricator task -- https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=wmcs-team [13:22:38] Smith609: is this for a bot or a webservice tool? [13:22:47] It's for a bot [13:23:18] 5.6 is only really available for webservices right now [13:24:09] I wonder whether I've understood what a webservice is [13:24:20] Currently, the bot is accessible via a public_html directory [13:24:31] https://tools.wmflabs.org/citations-dev/doibot.html [13:25:02] From memory, I thought that the currently deployed version is already using php 5.6-only functionality. Perhaps I'm wrong [13:25:27] ahhh [13:25:49] one sec [13:26:11] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#PHP [13:26:18] so run [13:26:20] $ webservice stop [13:26:27] $ webservice --backend=kubernetes php5.6 start [13:26:50] I'm currently testing the code in a folder that's not inside public_html [13:27:10] It sounds like I should move to within public_html to take advantage of this? [13:27:27] yes [13:33:20] (03CR) 10Ricordisamoa: "It should be investigated whether a unified query is actually beneficial to the app and/or WDQS vs separate queries which could be made pa" [labs/tools/ptable] - 10https://gerrit.wikimedia.org/r/337251 (owner: 10Ricordisamoa) [13:34:41] Great, thanks I'll give that a shot! [13:41:58] No luck I'm afraid; I've checked out my files to public_html/, restarted the webservice as suggested, and still php -v gives me 5.5.9 [13:43:00] Smith609: PHP is running in a different environment then when webservice [13:43:40] For testing, use `webservice backed=kubernetes php shell` [13:44:22] *use `webservice --backend=kubernetes php shell` [13:46:36] Great, thanks! Now php -v gives me 5.6... is it possible to use phpunit in this environment? [13:47:13] Not sure, does it give you an error? [13:47:30] * chicocvenancio does not use PHP much [13:47:36] bash: phpunit: command not found [13:48:02] Grab the phar [13:48:38] I'm not sure how I'd do that, sorry... [13:48:52] https://phar.phpunit.de/phpunit-5.phar [13:48:55] wget https://phar.phpunit.de/phpunit-5.phar [13:49:03] php phpunit-5.phar path/to/tests.php [13:49:29] wget: command not found [13:49:38] |-: [13:51:19] wget is not found inside the k8s shell, I presume [13:51:37] I'm guessing not. Not *nix savvy enough to know if there's an obvious alternative [13:51:51] You can use it from outside it [13:52:02] Directly in the bastion [13:52:22] How do I get back into the bastion? [13:52:37] That would either mean opening a new session or exiting the k8s shell with `ctrl+d` [13:53:01] Grand, ta. [13:54:58] Yay! That's done it! [13:55:05] Thanks very much for your suggestions. Much appreciated! [14:13:14] Is there any way for a script to tell that it is running on WMFlabs? I'd like it to use a different API key that is valid for toolserver IPs, but note that php's $_SERVER['REMOTE_ADDR'] is not set. [14:14:45] Smith609: I'm not sure I understand [14:15:15] Do you want to use a different api key? Why not just set that in a configuration file? [14:16:12] That's right. I'm hosting the code on GitHub and using Travis for continuous integration, so would like to be able to have a single file that provides the appropriate key based on where the script is being run [14:16:27] Beware files are generally world readable by a lot of users, and sometimes publicly accessible. Do make sure to restrict permissions of any files with secrets [14:16:50] The API keys are restricted to pre-specified IP address ranges [14:17:17] (which I'm assuming makes it unproblematic if they are viewable by the public) [14:17:44] Well, if you don't mind someone else using that api as you... [14:18:21] Because anyone with access to Wikimedia Cloud services will be able to use the api key if it is world readable [14:18:46] I recommend you leave any file with secrets to be user readable only [14:20:04] As for the changing keys based on env, it's an interesting approach. But your code has to find how to differentiate envs [14:20:34] That's the problem. Travis kindly set an environment variable, so I can just do if(getenv('TRAVIS')) [14:22:09] Perhaps, come to think of it, using environment variables myself offers a solution -- as these can be set privately at Travis, allowing me to keep the keys private. [14:25:11] That's usually my approach, encrypted Travis vars [14:40:44] And what's the best way of setting them on the WMF server? Is there a better way than including a (separate) php file? [14:40:51] *private [14:42:18] Usually it's a config file, doesn't really have to be php. I think that is the best practice, but it is not really the only way, or mandatory [15:30:35] Alright bigbrother is frustrating me. [15:31:01] I commented out an entry in the file and shut down the jsub jobs. [15:31:13] But BB keeps restarting it within seconds. [15:31:29] How do I shut down BB? [15:31:51] bd808: ^ [15:32:52] Anyone? [15:34:23] Nevermind it finally stopped respawning the task [17:44:36] (03CR) 10Jean-Frédéric: [C: 032] Move get_id_from_sort_key to common in preparation for re-use [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/447107 (owner: 10Lokal Profil) [17:45:52] (03Merged) 10jenkins-bot: Move get_id_from_sort_key to common in preparation for re-use [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/447107 (owner: 10Lokal Profil) [17:46:50] (03CR) 10jenkins-bot: Move get_id_from_sort_key to common in preparation for re-use [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/447107 (owner: 10Lokal Profil) [17:54:01] (03CR) 10Jean-Frédéric: [C: 032] Add first tests for missing_commonscat_links [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/447108 (https://phabricator.wikimedia.org/T176528) (owner: 10Lokal Profil) [19:53:24] !help I am using the k8 node shell for development of my bot on toolforge but then I wish to upgrade the node version on the shell. any hint on how i can go about that? [19:53:24] r054l13_: If you don't get a response in 15-30 minutes, please create a phabricator task -- https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=wmcs-team [19:54:53] Hey r054l13_, nvm is the answer there. Are you having troubles with it? [19:59:10] trying to install nvm now [20:24:19] this is all in a kube container btw.... what's the nice way to set everything up so that if the container is destroyed and recreated, it will have all the goodies? [20:24:40] like, nvm + version of node + whatever else is wanted [20:30:10] apergos: Install nvm, use it to install the node version, use npm in that version to install packages, set the start script in package.json to activate that nvm node version. [20:30:39] that's all in the container, right? but don't we need to automate that if the container goes away? [20:30:46] I mean, we can't save intermediate images afaik [20:30:50] chicocvenancio [20:30:55] also, thanks for helping out! [20:31:09] We can't save images, but nvm doesn't need that [20:31:35] It saves node versions (and packages) in the filesystem [20:31:59] on a filesystem external to the container, and it's mounted as a volume or something? [20:32:33] The k8s image will call `node start`, whatever that is. We can use that hook to activate nvm [20:32:57] Yes, the filesystem is mounted as a nfs volume [20:33:03] ah there's the missing piece [20:33:04] excellent [20:35:49] so basically you install all this on the bastion in your own env and then it's still available in the container for use later [20:35:54] r054l13_: ^^ [20:36:48] ok! [20:38:50] apergos: I'm not completely sure it'll work from the bastion because node is accient there [20:39:03] It will work from a k8s shell [20:39:21] we don't need it to run using the bastion's version [20:39:30] we need it to run using the version in the virtual enc [20:39:32] env [20:39:34] that's all [20:39:41] whether on the bastion or elsewhere, who cares [20:40:11] Well, I'm not sure nvm works with node 0.10 [20:40:17] ah but see [20:40:44] this was bootstrapped by virtenv (I think) -> node -> nvm (? I think) -> the rest [20:41:01] a pretty awful chain but it did get the job done [20:41:08] if there's a better route, that's cool too [20:41:19] I'm just a back seat driver for this :-) [20:41:27] Virtenv is not really needed, but I don't see why it wouldn't work [20:41:47] well it did work on the bastion at least, that way :-) [20:41:50] gross, it's true [20:41:54] I wish we had stretch images [20:42:13] OR the capability to apt-get things in containers [20:54:54] chicocvenancio: but I can be on the node shell and then later start the virtual env [20:55:15] that has a later version on node [20:57:38] If that works, then setting it in the `start` script should be enough [20:59:53] I tried and it worked [21:00:47] now set it in the start script and running the service, I get: your job is already running [21:01:15] but when I try the bot I get no reply, like it is not running [21:01:59] Then restart it, `webservice --backend=kubernetes nodejs restart` [21:02:52] ok [21:06:11] It seems the start script is not defined to use nvm atm [21:17:21] should it use nvm? [21:17:38] chicocvenancio: I mean the start script [21:18:23] Yes, it is what is run by webservice [21:19:58] Nvm needs to activate the node version before anything is actually run by node [21:21:55] but when I stop the webservice and run manually it works [21:22:16] without activation of node or using nvm [21:23:23] It might be activated by .bash_rc or .profile [21:24:09] Look at error.log [21:24:13] ok [21:32:33] error.log has very old errors logs. not sure the errors there are for recent executions. I had a look [21:56:25] note that this is a bot (it responds to tweets on twitter), not a web service per se (there's not going to be anything listening on 80 or 443 for users) [22:12:22] apergos: yes, it's web page will just timeout. The bot should work regardless [22:12:41] gtk