[13:02:23] Krinkle: Currently it uses the same sequence to generate the default values, so any IDs used in the temp copy won't get used in the master table. PG 10 introduced "identity" columns that start over from 1 in copies and don't have that reuse behavior, but when we still support 8.3... [15:50:51] Krinkle: Do you have an opinion on the "cancelable" flag to startAtomic() in https://gerrit.wikimedia.org/r/#/c/420219/4/ ? I'd as soon leave it out instead of worrying about a few extra DB statements when you do have an atomic section inside an existing transaction, so it looks like you get to be the tiebreaker. [16:52:20] Weird. When I go to https://gerrit.wikimedia.org/r/#/c/419798/ it shows PS5 and says "Patch Sets (5/5)". But clicking the dropdown shows that a PS6 exists. And selecting it says "Patch Sets (6/5)". [17:00:51] anomie works in pg [19:58:53] Krinkle (or anyone else): I was told you might have some QUnit skills. Hope it's okay to ask here... [19:59:00] I have some test cases that involve long strings, so I was hoping to put them in a JSON file and load it in my test.js file. Do you think something like this is possible? [19:59:14] it seems I can't simply do `var testCases = require('./path/to/file.json')` [19:59:35] musikanimal: I can't recommend it. Not unless you're writing tests for a Node.js app and/or run tests on Node, as opposed to in the browser. [19:59:58] It should be fine to have a var at the top of the scope that defines all the strings and then reference them from there. [20:00:05] yeah, that's what I was afraid of [20:00:19] Feel free to CC me on the patch once it's up. [20:00:30] I can, but it's going to be messy! and I hate I have to break out the strings into multiple lines [20:00:40] musikanimal: That shouldn't be needed. [20:00:40] the WIP is at https://gerrit.wikimedia.org/r/#/c/419513/ [20:01:03] I'm doing `strictEqual` assertions on the generated markup [20:01:25] which will make for a nice, comprehensive test, but there are a lot of things I want to cover. It's gonna get ugly! [20:06:08] I'll give this a go. Thanks for your help :) [21:56:35] musikanimal: Left some feedback [21:56:56] thank you! :) [22:04:58] anomie: https://office.wikimedia.org/wiki/Technology/Backend_task [22:10:25] * quiddity giggles [22:10:26] +1 for the My Little Pony theme [22:12:20] Evelyn's been bingeing on My Little Pony lately, she's up to season 5, she tells me all about it [22:12:46] although I still had to cheat and copy from http://mlp.wikia.com/wiki/User_blog:Mewkat14/The_Equestrian_Survey for these survey questions :) [22:16:51] do you think I should say something to limit the CSS/JS/layout aspect? [22:17:28] on the one hand, we are not hiring for that and it is potentially a time sink, on the other hand, if someone has awesome CSS skills then maybe we should know that? [22:18:46] anyone who doesn't use either no style or bootstrap should get demerits :) [22:27:37] Hm.. so what *is* the current recommended way of making a curl request to localhost mediawiki from an app server? Either I'm missing something, or all the documented ways have stopped working. [22:27:57] Krinkle: use case? [22:28:30] Just making a request to a index.php or some other entry (temporary) point in /srv/mediawiki/w/ and getting stuff to std out. [22:28:47] Mainly for debugging some stuff I'm working on for xhprof profiling. [22:28:50] How are you doing it? [22:29:17] the localhost part is the trickiest [22:29:19] My native starting point was curl http://localhost/w/static.php -H 'Host: test.wikipedia.org' [22:29:29] Which just returns 404 no matter what the url is. [22:29:50] it's on a non-standard port? [22:30:05] Apache is on a non-standard port? [22:30:09] I thought only HHVM is [22:30:42] For what its worth, the naive approach used to work, but I don't know how long ago that was [22:31:00] There was also a variation at some point that involved using --resolve [22:31:08] Which worked for a while. [22:32:20] bd808: so anything but bootstrap or raw html is fine? [22:33:10] Krinkle: are you setting an X-Forwarded-Proto: https header too? I think that may be needed [22:33:58] curl -i --resolve 'test.wikipedia.org:80:127.0.0.1' -H 'X-Forwarded-Proto: https' 'http://test.wikipedia.org/w/load.php' [22:33:59] 404 [22:33:59] curl -i -H 'Host: test.wikipedia.org' -H 'X-Forwarded-Proto: https' 'http://localhost/w/load.php' [22:34:00] 404 [22:37:27] Tried on a pooled app server as well in case it's something with mwdebug1001 [22:37:29] same result [22:38:11] I'm trying to trace the apache config and figure out how it picks a vhost [22:40:50] Krinkle: I'm baffled. 03-main.conf has a ServerAlias *.wikipedia.org vhost that looks like it should pass /w/load.php to fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wikipedia.org/w/load.php [22:45:30] bd808: I'm also trying simpler cases from higher in main.conf [22:45:31] curl -v -H 'Host: www.mediawiki.org' -H 'X-Forwarded-Proto: https' 'http://localhost/FAQ' [22:45:36] But also 404 [22:45:42] https://github.com/wikimedia/puppet/blob/production/modules/mediawiki/files/apache/sites/main.conf#L23 [22:46:39] curl -v -H 'Host: www.mediawiki.org' 'http://localhost/' - the root shows Unconfigured domain [22:46:48] So I guess none of the vhosts are matching, somehow [22:50:55] .. which comes from https://github.com/wikimedia/puppet/blob/production/modules/mediawiki/files/apache/sites/nonexistent.conf - so that one is working [22:52:06] On an mwdebug server, `curl -v -H'Host: www.mediawiki.org' 'http://localhost/'` returns our nonexistent:docroot/default thing. But (!), on a pooled server, it returns the Debian default splash page. [22:54:02] * Krinkle raises eyebrows. How is anything working at all right now. I mean.. what does Varnish do that's different here that Apache itself cares about? [22:54:45] Interesting. I think I found it. [22:54:59] bd808: We don't support IPv4 anymore. [22:55:03] curl -v -H'Host: www.mediawiki.org' 'http://mwdebug1001.eqiad.wmnet/' [22:55:08] This one works when done from another mwdebug server [22:55:17] localhost = 127.0.0.1 [22:57:44] Although with localhost, curl -v says it uses IPv6 (* Connected to localhost (::1)), so it's not just IPv4, but I guess Apache just isn't listening for ::1 for some reason. [23:00:15] the port 80 bind shows as ":::80" which should be both ipv4 and ipv6 [23:00:33] I ... think? [23:02:59] From mwdebug1001 using mwdebug1001s IPv4 IP, it works [23:03:01] curl -v -H'Host: www.mediawiki.org' 'http://10.64.32.123/w/load.php' [23:03:14] So it's not about whether it's a local connection either [23:03:57] funky. this works -- curl -v --resolve 'test.wikipedia.org:80:[::1]' -H 'X-Forwarded-Proto: https' 'http://test.wikipedia.org/w/load.php' [23:04:49] bd808: Is that using localhost? [23:05:00] * Resolve test.wikipedia.org:80:[::1] found illegal! [23:05:00] * Hostname was NOT found in DNS cache [23:05:00] * Trying 2620:0:861:ed1a::1... [23:05:00] * Connected to test.wikipedia.org (2620:0:861:ed1a::1) port 80 (#0) [23:05:00] > GET /w/load.php HTTP/1.1 [23:05:12] yeah, [::1] is the ipv6 localhost [23:05:30] Should be yes [23:05:32] or should be [23:05:54] ah I see that error message now [23:06:02] * bd808 shrugs [23:08:02] The most confusing part to me is that it does match the custom fallback VirtualHost we have [23:08:21] although even that only happens on mwdebug, not on the pooled app servers, which display the Debian page instead. [23:09:49] E.g. `curl -v -H 'Host: www.mediawiki.org' 'http://[::1]'` returns /srv/mediawiki/docroot/default/index.html from nonexistent.conf, which is a virtualhost like the others, so it is not like the virtualhosts are disabled in this mode for some reason. [23:13:49] `--resolve 'test.wikipedia.org:80:::1'` is apparently the right IPv6 syntax and leads right back to the 404 response [23:15:10] * bd808 runs away in fear [23:29:43] bd808: For now, I've got two work arounds. 1) `curl -v --resolve "test.wikipedia.org:80:$(hostname -i)" 'http://test.wikipedia.org/w/load.php';` or 2) `curl -v -H 'Host: test.wikipedia.org' "http://$(hostname -i)/w/load.php";` [23:35:43] bd808: Figured it out. It has something to do with https://gerrit.wikimedia.org/r/#/c/239998/6/modules/apache/files/status.conf. The virutalhost there is occupying all requests from IP 127.0.0.1 (and apparently including localhost and ::1 by some magic), regardless of what Host header it carries. [23:35:58] I removed that file locally and it all started worked the normal way [23:36:05] e.g. curl -v -H 'Host: test.wikipedia.org' "http://localhost/w/load.php"; [23:37:25] of course ori broke it :) [23:37:48] heh [23:38:11] also that explains why my greps in sites-enabled were not finding anything special about localhost