[00:49:00] Somebody should file a bug that phabricator should use and instead of for diffs [03:51:33] yeah someone should [14:02:38] Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: @addshore & @Pablo_WMDE - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:59:22] o/ [15:01:32] o/ time for taim [15:02:09] Welcome all to this weeks install of the Technical Advice IRC meetting! [15:02:44] With Pablo_WMDE and myself! [15:02:49] Hello! [15:03:08] o/ [15:03:14] \o [15:03:18] \o/ [15:05:22] ~o~ [15:08:14] So, any questions?? :D [15:08:45] I have one, I asked earlier, but got no reply (or got lost in connection failure) [15:09:03] okay! [15:09:10] fire away! [15:09:11] So I've created a PHP version of the OOUI NumberInputWidget, but I can't get it to infuse properly [15:09:18] Let me look up the error real quick [15:09:35] ooooh, interesting [15:10:10] So it says Unkown widget type; OO.ui.NumberInputWidget. Inspecting in the Browser tools shows that OO.ui does not contain NumberInputWidget. [15:10:44] I recall that in MediaWiki you had to add a .widget resource loader module, but I'm not sure how I'd do such thing for OOUI, if that's even the solution [15:11:16] The JavaScript version works fine on the JavaScript part of the demo. [15:11:24] hmmm [15:11:32] did you follow https://www.mediawiki.org/wiki/OOUI/PHP_examples ? [15:12:24] It may have something to do with resourceloader modules and dependencies [15:12:44] That should've been handled by the Demo, basically all I've done is add the fields to the demo. [15:13:17] I forgot to mention that this is the OOUI standalone version, outside MediaWiki. So there's not MediaWiki running, just like here: https://doc.wikimedia.org/oojs-ui/master/demos/demos.php [15:13:43] oh. is ee [15:13:46] i see [15:13:52] Ahhhh [15:15:21] mainframe98: do you have a copy of code we can run locally? [15:15:42] I'll see if I can create a gist. [15:15:51] that would be great! [15:18:36] Gist: https://gist.github.com/mainframe98/8370dc2b887c0b081ab16e131762a6e8 [15:19:01] Should just be applicable to https://phabricator.wikimedia.org/diffusion/GOJU/ by git apply [15:21:57] mainframe98: Looking at the demo page above I just saw, that it does not include a NumberInputWidget ... so also in the JS code of that Demo page is no NumberInputWidget loaded / defined [15:22:32] When you go to the JS tab on the demo page the widgit is included but not on the PHP tab [15:23:29] Indeed, which is why I've (attempted to) create a PHP version, which should be infusable. The console then reports that on the PHP tab that it can't infuse the numberInputWidget because of an unknown widget type [15:25:04] But still you would need to load the JS for that widget I guess [15:25:37] at least if I am not totally mistaken here ^^' [15:26:37] CFisch_WMDE: Well, on the PHP tab, the other widgets are loaded on infusion, except NumberInputWidget. It doesn't help that I can't find anywhere I'd need to add something that should load it. [15:27:13] I've got nothing to compare it too. It almost seems the other widgets are loaded through magic, since I can't find an explicit loading mechanism [15:27:32] So, https://doc.wikimedia.org/oojs-ui/master/demos/dist/oojs-ui-widgets.js contains NumberInputWidget [15:28:13] Interestingly the PHP page loads explicitly, not sure why [15:28:47] Bet that that is because the show case for the buttons is unique in the sense that it's for show, and not really for actual use. [15:29:29] The PHP page only loads https://doc.wikimedia.org/oojs-ui/master/demos/dist/oojs-ui-core.js that does not contain the NumberWidget [15:29:37] when the infusion code runs from https://doc.wikimedia.org/oojs-ui/master/demos/infusion.js [15:29:44] he goes through all elements [15:29:47] Hello, I had a problem when installing Pywikibot in Python 3.5 [15:29:54] but can not identify the NumberWidget [15:30:03] because the js for it is not present [15:30:05] Hi Csisc! What's the problem? [15:30:48] if you include the https://doc.wikimedia.org/oojs-ui/master/demos/dist/oojs-ui-widgets.js on the php demo page infusion should work for the number widget [15:30:51] ( I hope ) [15:31:30] When I wrote Import Pywikibot in Python a text in red had appeared [15:31:50] CFisch_WMDE: I'll try that, thanks [15:32:07] :-) [15:33:50] CFisch_WMDE: Currently it looks hideous, but it works, thank you! [15:34:13] There's still some bugs to fix, but the infusion works at least [15:34:31] Csisc: what did it say? [15:37:43] I made user-config py [15:37:56] After, I installed Pywikibot [15:38:43] When I runned an algorithm using Pywikibot, a text in red has appeared. [15:41:38] mainframe98: You're welcome! [15:45:55] Csisc: what did the text say? :) [15:46:49] Pywikibot does not work. I should verify user-config... [15:47:14] ...or the connection [15:47:33] hmmm [15:47:50] What is in your user-config (without the sensitive bits) [15:48:45] Wikidata.wikidata Csisc and my password [15:49:45] Csisc is my username [15:50:49] What are you calling when you get the error? [15:50:52] can you paste your code? [15:51:23] Import Pywikibot [15:51:38] Just that. [15:51:39] Well, so that should probably be "import pywikibot" [15:51:50] have you followed https://www.mediawiki.org/wiki/Manual:Pywikibot/Wikidata / [15:51:51] ? [15:52:29] Did you set your username in the user-config.py as a unicode string? [15:52:39] (the u before the string in) usernames['wikidata']['wikidata'] = u'YourBot' [15:53:41] Yes [15:58:51] Can I see a copy of the script that you are trying to run? [15:58:53] I think that I should contact you by email as the meeting is closing now [15:59:07] indeed, however I might not be the best person for pywikibot issues [15:59:15] perhaps you should join #pywikibot and ask in there :) [15:59:21] Otherwise there is also a pywikibot mailing list [15:59:44] I will do that. Thank you. [15:59:54] Good Bye. [15:59:56] o/ [16:00:07] And that concludes this weeks IRC technical advice meeting session office hour! [16:00:16] Thanks for coming all [= [21:43:46] bd808: meh, vagrant provision failed again -- same way it failed initially a few weeks ago, it just froze in the middle. The initial set up was finally done, at home, with my internet running properly, and then it went through provisioning, and then died at some point... I thought I was hallucinating, so I tried vagrant ssh -- but that timed out, so the machine is clearly dead. [21:43:54] bd808: help me oh vagrant whisperer [22:30:35] mooeypoo: :( -- why does Vagrant fight you so badly? [22:31:11] Is this the channel for code review during open office hours? [22:31:57] bd808: no idea, but I removed 'visualeditor' role and am retrying provisioning now [22:32:19] I've crossed fingers and toes, and am awaiting Vagrant judgment [22:32:59] bd808: I also ssh'ed in, and am watching 'top' just to see if things crap out [22:33:10] have you tried `vagrant git-update` [22:33:26] mooeypoo: setting the PUPPET_DEBUG=1 environment variable can help spot why it suddenly gets stuck sometimes. Usually its a git clone or an apt-get install. [22:33:52] HunterH: the initial bare-bones 'just cloned mw-vagrant' failed, so I don't think vagrant git-update would help here? Doesn't that just re-pull vagrant itself + all extension repos? [22:33:53] something like `PUPPET_DEBUG=1 vagrant provision` [22:34:01] I don't have extensions yet, I removed them all [22:34:23] there was some instability with gerrit access yesterday too [22:34:31] bd808: I have, prepared, this command in case it fails again: VAGRANT_LOG=debug PUPPET_DEBUG=1 vagrant provision 2>&1 | tee provision-4-11-2018.log [22:34:35] That should do it [22:34:41] mooeypoo: I see. I was having some issues with VisualEditor and the update fixed it. [22:34:47] I tweaked your command bd808 :P [22:35:00] mooeypoo: nice. that should give us something to look at for sure [22:36:00] HunterH: to your code review question, I'm not sure if twentyafterfour and other folks are still holding the office hour for that or not. [22:36:09] aaaand it is hanging [22:36:12] ok, time for the big guns [22:36:57] HunterH: But this is generally a good channel to ask for help in. Not always quick for answers, but generally somebody will take a shot at helping at some point [22:37:48] bd808: I think the next office hour is tomorrow at 20:00 UTC. I haven't sat in for one yet and was just checking out the #wikimedia-codereview channel to make sure i was in the right place. [22:40:48] Are we doing those again? [22:42:07] * bd808 volunteers bawolff to review all the codez [22:42:34] [Oprah voice] Everyone gets a +2 [22:47:16] https://www.irccloud.com/pastebin/uPhiAYZs/ [22:47:26] ... that was stupid, irccloud [22:47:40] bd808: vagrant seemed to die again. The top thread i see in "top" in vagrant ssh is [22:47:40] /usr/bin/node /vagrant/srv/changeprop/node_modules/service-runner/service-runner.js -c /vagrant/srv/changeprop/config.vagrant.yaml [22:47:42] vagrant provision is continuing to send ssh keep-alive, but "top" in vagrant ssh isn't moving, and 'vagrant ssh' in another tab craps out with 'connection reset by peer'. I assume it's dead. [22:47:53] I do have a log file... [22:49:04] changeprop running would be "normal" once it is provisioned. that shouldn't be blocking things however. [22:49:31] dig in the log file for the last thing that Puppet was trying to do [22:50:20] that might be easier without the `VAGRANT_LOG=debug` bits. That is mostly useful for debugging early failures in getting the VM created [22:51:53] bd808: last few lines (before a barrage of ssh 'keep alive') from that log: [22:51:56] https://www.irccloud.com/pastebin/LL5m3gBv/ [22:52:12] so, it seems like git clone? [22:52:18] looks like it [22:52:23] is it an internet problem again!? [22:52:33] OMG I'M GOING HOME [22:52:39] Where I have actual internet! [22:53:03] clones practically instantly from my house :) [22:53:11] But why would vagrant *freeze* [22:53:20] the machine froze completely [22:53:25] it can't be just the connection [22:53:31] that sounds more dire [22:53:53] like kernel instability or a problem with VirtualBox [22:53:59] do you have 2 VMs running at the same time by any chance? [22:54:00] :\ [22:54:11] I don't right now. I had once before, but not now [22:54:14] mooeypoo: just for giggles, have you tried running with the LXC driver? [22:54:15] i see that as a response to somebody talking about vagrant freezing and ssh [22:54:19] that's why i asked [22:54:27] I have another vagrant box for another thing but it's not up [22:54:34] Should I remove it completely? :\ [22:54:59] I either run this vagrant or the other, never at the same time, especially during provisioning [22:55:04] You can check if you have 2 machines running with vagrant global-status. That causes terminal when in ssh to freeze. [22:55:06] for what it's worth I run 3-4 VirtualBox VMs on my mac at the same time. Only problem is when all my cpu cores get busy [22:55:44] I have a couple there that are no longer in existence, but they're all "poweroff" except for the mediawiki vagrant [22:56:31] Should I reinstall virtualbox? [22:56:39] You know this whole started when I upgraded the guest OS :\ [22:57:10] But since then, I multiple times deleted everything, and re-cloned mw-vagrant to start from scratch [22:57:15] you had lots of the lockup problems with the older Jessie base image too though right? [22:57:27] the bug where it would hang mid boot [22:57:32] I just had intermittent ssh issue there [22:57:43] For the most part, it works decently [22:58:04] I upgraded because we were working on a kartotherian puppet role and it wouldn't run with the old OS [22:58:31] And then it started crapping out every 10 minutes, dying randomly, and not provisioning [22:58:44] I think it might be worth trying to run as an LXC container. The basic instructions are in support/README-lxc.md [22:58:46] why not try the reinstall. i dont know why but askubuntu.com also has that "Re-install virtualbox-dkms package first" [22:59:01] The "crapping out every 10 minutes" was a problem with parsoid not finding crap in its node_modules folder; an 'npm install' solved it [22:59:10] ok, i shall try [22:59:15] If I was on a linux host I would personally use LXC over VirtualBox [22:59:15] At this point, I'll try anything [22:59:51] who-ta-whatta? [22:59:54] node.js is the root of much evil. maybe not as much at RoR, but close ;) [23:01:49] ok I have virtualbox 5.2 installed [23:01:53] should I remove and reinstall it? :\ [23:03:41] mooeypoo: if you are going to blow another evening on this, try getting the LXC setup to work instead. If you get it running correctly it will perform better than virtualbox [23:04:32] I would rather not blow any evenings on this, but I can't work without this running :\ [23:04:34] the ubuntu instructions we have are for old Trusty boxes, but you should be able to google up "vagrant lxc" setup instructions for your newer version [23:05:18] the LXC runtime is what we use for the MediaWiki-Vagrant role on Cloud VPS hosts [23:05:48] do you have a link to instructions on how to install that? [23:05:52] basic instructions are in support/README-lxc.md of the mediawiki-vagrant repo [23:06:01] ooh [23:06:20] you might find more help at https://github.com/fgrehm/vagrant-lxc too [23:06:50] I don't need to uninstall virtualbox do I? [23:06:55] nope [23:07:00] just checking [23:07:19] at this point, seriously, I'm considering dancing around my computer with incense and chanting binary [23:07:33] 000111 [23:08:31] mooeypoo: I'm going to wander away from my laptop for a while. ping me if you get stuck [23:27:33] bd808: ok, I installed lxc and ran 'vagrant up' and I get this: [23:27:43] https://www.irccloud.com/pastebin/qrOxpAG7/ [23:27:57] There's nothing using port 8080 in my machine... why is it saying it's taken :\ [23:29:11] I always do netstat -tuln | grep ":8080" [23:29:14] mooeypoo ^^ [23:31:17] paladox: no result [23:31:22] oh [23:31:25] if you add 'p' to that it also tells you which program is running it [23:31:34] sure, but nothing is using 8080 [23:32:13] https://stackoverflow.com/questions/10953070/how-to-debug-vagrant-cannot-forward-the-specified-ports-on-this-vm-message [23:32:17] mooeypoo ^^ [23:32:30] on the host machine, not the guest machine, right [23:32:41] You know, guys [23:33:02] oh, wait, it's not 8080 [23:33:04] if this is what volunteers run into when they're trying to set up our dev environment, we are screwed even before retention [23:33:09] it's "The forwarded port TO 8080" [23:33:19] To fix this, modify your current project's Vagrantfile to use another [23:33:20] port. Example, where '1234' would be replaced by a unique host port: [23:33:20] config.vm.network :forwarded_port, guest: 8080, host: 1234 [23:33:22] huh? so what's the forwarded port? [23:33:26] so it's the 1234 part in that example above [23:33:32] yeah but -- oh [23:33:41] 8080 on guest to 1234 on host [23:33:45] and 1234 on host already used [23:33:45] ... doesn't that do that automatically? :\ [23:33:45] afaict [23:33:55] "Sometimes, Vagrant will attempt to auto-correct this for you. In this [23:33:56] case, Vagrant was unable to." [23:34:09] i'd be excited if #mediawiki-vagrant actually existed [23:34:19] lol [23:34:41] You have to set a config for vagrant to do it automatically [23:34:54] This is usually because the guest machine [23:34:54] is in a state which doesn't allow modifying port forwarding. You could [23:34:54] try 'vagrant reload' (equivalent of running a halt followed by an up) [23:34:54] so vagrant can attempt to auto-correct this upon booting. Be warned [23:35:03] that any unsaved work might be lost. [23:35:10] grr [23:35:38] config.vm.network :forwarded_port, guest: 8080, host: 1234 <-- this should be in the Vagrantfile, right? [23:35:47] yep [23:35:58] mooeypoo search the file for port 8080 [23:36:05] it should find the correct line [23:37:20] I put it under the override for lxc [23:38:27] GUYS. HOLD YOUR BREATH -- it's working [23:38:37] It's loading facts! [23:38:44] IT IS PROVISIONING [23:39:00] please don't get stuck please don't get stuck please don't get stuck [23:39:08] * mooeypoo is going to let it run [23:39:09] lol [23:39:52] OK I'll take this time to take a coffee break [23:40:01] ... wish me luck as I leave vagrant to its own devices [23:45:21] hehe, nice. good luck [23:57:01] omg it finished without errors [23:57:14] I'm going to cry [23:57:23] It's running... fast! [23:57:37] ok. so. now.... roles. [23:57:41]