[11:34:54] hello [11:40:28] hello hashar [11:41:02] Platonides: hiii :-) [11:41:17] just woke up of a morning nap :/ [11:41:26] + point, I feel rested! [13:44:43] https://twitter.com/jonty/status/252765497127485440 I am developing a theory that all hack days called "hackathons" are horrid. [14:05:20] hi Reedy :) [14:06:25] <^demon> hashar: So, it's unlikely that openstack's patch will make the 2.5 release cycle. I didn't get a working 2.5 build friday, but I'll try to have that done by the end of today. [14:06:35] <^demon> (Also going to need to build replication plugin, since my patch didn't make it in) [14:06:41] hi ^demon :) [14:06:45] <^demon> Howdy :) [14:06:49] <^demon> How was your weekend? [14:06:57] * hashar should write script for: print "hi %s :)" % name [14:07:02] horrible [14:07:06] like the past 2 weeks [14:07:10] <^demon> Oh, I'm sorry to hear that :( [14:07:21] daughter been crying every morning, awake at 11pm AND 3am [14:07:42] I am so tired that I took a 4 hours nap this morning (I haven't heard the alarm clock) [14:07:47] I guess she is sick :-D [14:07:54] enough ranting [14:08:23] ^demon: was your 2.5 issue related to the OpenStack patch or just that stable-2.5 does not work yet? :) [14:08:39] the later would explain why it is not released yet [14:09:07] <^demon> stable-2.5 mostly works. [14:09:12] <^demon> I think there's a regression though. [14:10:05] another possibility for us would be to build 2.4.2 + the openstack patch I need [14:10:11] that it is probably less troubles for you [14:10:23] <^demon> "There is a difference in the way Guice is configured between the internal Jetty, and running Gerrit as a WAR in a standard J2EE container. Looks like the latter case is not well tested and was broken when plugin support was added. This should probably be fixed before 2.5 ships, because many users do run Gerrit in the WAR environment." [14:10:25] though you still want to track bugs for 2.5 [14:10:29] <^demon> 2.5 regression ^ :( [14:11:07] <^demon> That'll probably hold up 2.5, but doesn't affect us. [14:11:24] <^demon> We use the internal Jetty :p [14:11:35] cause we proxy directly to the :8080 port Gerrit is listening too ? [14:11:56] (I don't know anything about jetty, guice and the java world hehe) [14:12:09] <^demon> Yeah, gerrit's internal jetty publishes on :8080, which apache proxies out over :443. [14:13:05] since you git & gerrit gurus are around, lemme ask this (hopefully) quick question that's been bothering me for a while: why are we using gerrit instead of rewriting/extending the CodeReview extension to support git? [14:13:29] Wheeee, time saved [14:13:32] <^demon> ashley: Because writing code review for git is not an easy task. [14:13:33] Gerrit is already there [14:13:52] CodeReview would need a large amount of work to add a pre-commit workflow to be added [14:13:54] Run scap, let it rebuild the localisation cache, stop it. Scap again and have it build it correctly, saves 2 useless syncs out [14:13:56] <^demon> With SVN, it's a simple linear history so all we basically did with CR was copy the entire linear history to SQL and work from there. [14:14:24] Reedy: you can rebuild the l10n cache with mw-update-l10n [14:14:38] Reedy: I have extracted the l10n cache rebuilding function out of scap to that mw-update-l10n [14:14:45] well, I'm sure we could build a better system than gerrit... [14:14:46] yeah, i don't think that'll fix the stupid building of the wrong version first time round [14:15:07] ashley: most probably, but we took the decision to use something already existing instead of reinventing the wheel :) [14:15:27] ashley: I guess you are getting confused by Gerrit aren't you ? We can help you feel at home there :) [14:15:40] it's not a bad desicion...but gerrit itself is pretty bad IMHO [14:16:08] ashley: said otherwise : "it has some bad GUI design" :) [14:16:35] ashley: if you have any idea to make it better, feel free to post on wikitech-l or open bugs against the Wikimedia -> git/gerrit component [14:16:41] we do track the issues and report them upstream [14:16:44] probably at least that, I can't comment on the backend as I've never had to deal with that (thankfully!) [14:16:55] <^demon> Upstream is super-responsive to us as well :) [14:16:58] hashar: I just reported my best idea here: extend CR and ditch gerrit ;) [14:17:00] Chad is even talking with upstream regularly [14:17:02] <^demon> And to patches ;-) [14:17:21] ^demon: I'd be surprised to see someone being _unresponsive_ to the WMF and its representatives... [14:17:37] ashley: yeah I heard your point but we are dismissing it simply because we do not want to improve CodeReview anymore. It is kind of abandoned software nowadays :/ [14:17:46] <^demon> ashley: Well, some upstreams aren't responsive to anyone :p [14:18:28] <^demon> Supporting CodeReview is kind of a time-sink for us. We're writing a tool that (pretty much) nobody uses except us. Much more efficient use of time to use someone else's tool, and fix where it's broken. [14:18:32] ashley: CR has been a good soldier, but we need a better weapon nowadays. Specially with the number of commits flowing in nowadays [14:19:38] CR is a good tool and not supporting it feels wrong; it's not as AJAX-y or otherwise fancy like gerrit and whatnot, but it works and it's (a lot more) usable than many of these fancy tools [14:20:18] (case in point: it takes *ages* to render the list of projects = repositories in gerrit, plus let's not forget the fact that gerrit won't even render in IE9's default rendering mode, forcing you to enable compatibility mode for *.wikimedia.org...) [14:21:25] I am sorry to say that ashley, but we are not going to use CR anymore [14:21:38] <^demon> The "ages to load project listing" isn't true anymore. [14:21:55] <^demon> That was fixed in 2.4 upgrades + changing databases. [14:22:34] https://android-review.googlesource.com/#/admin/projects/ <-- super fast :-] [14:23:00] the IE9 issue is a different thing though [14:23:05] <^demon> So was https://gerrit.wikimedia.org/r/#/admin/projects/ :) [14:24:02] ashley: the IE9 compatibility issue seems to be tracked with http://code.google.com/p/gerrit/issues/detail?id=926 [14:24:13] <^demon> And https://code.google.com/p/gerrit/issues/detail?id=1530 [14:25:02] createElement('
') ... [14:25:38] <^demon> I wonder if the GWT 2.3 move happened yet. [14:25:41] my IE begs to differ re:WMF's gerrit, "A script is preventing the web page at wikimedia.org from responding" and it takes ages for the project list to load (Win7/IE9) [14:26:14] (and I would like to know who to blame for choosing gerrit over extending CR, just for the sake of it) [14:27:16] <^demon> "Extending CR" was abandoned as an idea well before Gerrit was chosen. [14:27:23] ^demon: I have no idea how to verify that. gerrit-gwtui/pom.xml simply list com.google.gwt [14:27:30] <^demon> hashar: Looks like no [14:27:42] <^demon> ashley: Many of the early switching to Git discussions all agreed that extending CR was a non-option [14:28:23] ashley: yup the community mostly agreed it was not worth the time to switch CR to get git support [14:28:33] would take too many engineers days to got something [14:35:22] https://test2.wikipedia.org/ [14:35:25] No localisation cache found for English. Please run maintenance/rebuildLocalisationCache.php. [14:35:27] Damn you MW. [15:13:01] sumanah: https://twitter.com/jonty/status/252765497127485440 [15:13:41] Reedy: Have you ever heard of Sturgeon's Law? [15:17:02] hashar: Is there a nice way to pass key value pairs as a test provider? Without iterating over it to make it array( $key, $value )? [15:17:40] $output = array(); foreach( $foo as $key => $value ) { $output[] = array( $key, $value ); } [15:18:18] I've rewritten it somewhat https://gerrit.wikimedia.org/r/#/c/22936/9/tests/phpunit/includes/api/ApiGeneratorTest.php,unified [15:20:41] sumanah: sounds about right ;) [15:30:25] Reedy: given gerrit is dead .. hm I will have trouble answering :-) [15:31:10] hashar: don't really need gerrit to answer that question. You don't need to visit the page ;) [15:32:53] Reedy: so the data providing functions are a huge array [15:32:59] yeah [15:33:02] each entry is an array of paramaeters [15:33:08] I know :p [15:33:18] it doesn't like being passed array( foo => bar, baz => boo ); [15:33:28] yeah a huge array [15:33:32] which only contains array [15:33:42] it wants array( array( foo, bar ), ( baz, boo ) ); [15:33:43] it wants array( array( foo, bar ), ( baz, boo ) ); [15:33:58] so should be: array( array(case1, foo) , array(case2, bar) ) [15:34:22] the way I remember about that is by using a $cases = array(); in my provider [15:34:46] then I append each cases to it: $cases[] = array( 'para1', 'para2' ); [15:34:57] http://p.defau.lt/?knkZApouMLsvnoHlwCw4lg [15:35:00] ^ just seems stupid [15:35:06] $cases[] = array( 'para1', 'parasometing' ); [15:35:23] that one should work [15:35:26] isn't it ? [15:36:23] array( 'foo' => 'bar', 'baz' => 'boo' ); [15:36:26] ^ that won't 'work [15:36:35] PHPUnit does something like: foreach( dataProvider() as $value ) { call_user_func_array( 'testMethod', $value ); } [15:36:58] ahh hm [15:37:13] Damnnit. Why isn't setUp called before it gets the data from your provider? [15:37:20] $output = array( array( 'foo' => 'bar', 'baz' => 'boo' ) ); [15:37:29] $output[] = array( array( 'foo' => 'bar', 'baz' => 'boo' ) ); [15:37:42] which will pass as first parameter: array( 'foo' => 'bar', 'baz' => 'boo' ) [15:38:17] setUp is run before each test [15:38:24] and the provider gives the tests [15:38:28] so setUp must be run after [15:38:38] you could use __construct() or setupBeforeClass() [15:38:49] the later is run when the class is ibuild [15:40:01] there is even assertPreConditions and assertPostConditions which are run before/after each asserts but I never used them myself [15:40:55] ahh Reedy doc is at http://www.phpunit.de/manual/current/en/fixtures.html#fixtures.more-setup-than-teardown [15:41:22] hashar: http://p.defau.lt/?HZMcxB1czy_3wvj0YLMozQ [15:41:26] I might just keep that ;) [15:41:53] uggllly :-D [15:42:23] I will give a poke this evening [15:42:25] http://p.defau.lt/?R70wIM_HqLVr_KuTfY_cWQ [15:42:29] ^ And that is better? :p [15:42:51] yeah that one looks nicer [15:42:57] o_0 [15:44:41] Reedy: would "instaceof" work ? [15:44:57] no, we're not instaniating them [15:45:04] though, doing so might not be much more expensive [15:45:44] and this way you could use the assertInstanceOf() from PHPUnit [15:45:51] mmm [15:45:54] * Reedy shrugs [15:45:55] but I guess we don't need to initialize the objects [15:45:59] that will slow down the tests a bit [15:46:02] so that is fine [15:46:15] I am looking how we can mark a test as passing [15:47:00] if ( $obj instanceof ApiQueryGeneratorBase ) { [15:47:00] $retval['generator'] = ''; [15:47:00] } [15:47:03] ^ we do that in ParamINfo [15:47:26] <^demon> is_subclass_of() is such a silly function name. [15:47:28] * ^demon whacks php [15:48:17] 90 minutes later [15:48:20] SCAP IS STILL FUCKING RUNNING [15:49:41] <^demon> I haven't run scap in so long. [15:49:48] <^demon> When did it get so fucking slow? [15:49:52] * marktraceur watches and popcorns [15:50:00] It's usually half an hour [15:50:15] or nearer 1 if you're deploying a new version/rebuilding 2 l10n caches [15:50:26] * Reedy hits enter a few more times [15:50:41] Button mashing: Will usually make things load faster [15:51:01] IT wouldn't be the first time it's fixed things [15:51:06] hanging ssh prompts and stuff [15:51:11] snapshot1001 [15:51:19] * marktraceur thanks Nintendo for bad misconceptions about how software works [15:51:47] aha, it's on the last few hosts now [15:51:48] * Reedy dies [15:52:56] <^demon> marktraceur: You mean pulling it out, blowing dust off it, and plugging it back in again doesn't work in other situations? [15:53:16] <^demon> Granted, that's a hardware issue :p [15:53:53] ^demon: No, I find that works with a lot of hardware (there's a joke in there somewhere, but it's too obvious) [15:54:04] "I can't get it up..." [15:54:42] Hmmm, the HTTPS padlocks have disappeared [15:54:46] https://test2.wikipedia.org/wiki/Special:Version [16:01:39] test2 is now on 1.20wmf1 if anyone cares [16:04:15] <^demon> test2? [16:04:18] <^demon> That's my favorite wiki. [16:17:54] 1.21wmf1 :P) [16:17:56] :) [16:19:44] * aude cares [16:23:07] need to wait till its on test and mediawiki.org to get some proper usage [16:27:47] chrismcmahon, zeljkof__, if you need any help with my hackish tests let me know :) [16:27:53] hi zeljkof__ [16:34:59] hi marktraceur and sumanah :) [16:35:06] hi zeljkof__! welcome [16:35:23] thanks [18:03:17] 1.21wmf1 on testwiki, test2wiki and mediawikiwiki [18:03:21] please test, etc [19:14:33] !g I2521b78c7de94c183b7de7e7d4b2b510ab0c7770 [19:14:33] https://gerrit.wikimedia.org/r/#q,I2521b78c7de94c183b7de7e7d4b2b510ab0c7770,n,z [19:15:31] !g If8d16b066015ed1bcaf38408511ac3713eaa6540 [19:15:31] https://gerrit.wikimedia.org/r/#q,If8d16b066015ed1bcaf38408511ac3713eaa6540,n,z [19:16:49] Stop spamming your keyboard [19:17:51] is there a cat walking across hashar's keyboard? ;-) [19:18:16] ;-D [19:19:54] bsitu. I can't find you on Trello, username? [19:21:20] DarTar: it's bsitu [19:21:44] k - invite sent [19:41:33] hashar: https://gerrit.wikimedia.org/r/#/c/22936/11/tests/phpunit/includes/api/ApiGeneratorTest.php,unified [19:41:34] There :p [19:42:38] Reedy: the first line is still tooooo long :] [19:42:58] I shortened both that, and the upper lines [19:43:06] 65? Pfft [19:43:08] you need a blank line too :-) [19:43:34] example: https://android-review.googlesource.com/#/c/43692/ :-] [19:47:22] Damn [19:47:23] $this->assertFalse( isset( $prefixes[$prefix] ), "Module prefix '{$prefix}' is shared between {$class} and {$prefixes[$prefix]}" ); [19:47:33] ^ can't do that, beacuse it whinges about undefined index making the message [19:47:34] lol [19:48:14] nvm [19:48:45] Reedy: so you want to assert that $prefixes as a key named $prefix probably [19:48:57] _doesn't_ have [19:49:15] s/as/has/ [19:49:17] $this->fail( "Module prefix '{$prefix}' is shared between {$class} and {$prefixes[$prefix]}" ); [19:49:17] } [19:49:21] bah [19:49:25] if ( isset( $prefixes[$prefix] ) ) { [19:49:25] $this->fail( "Module prefix '{$prefix}' is shared between {$class} and {$prefixes[$prefix]}" ); [19:49:25] } [19:49:56] assertArrayNotHasKey( mixed $key, array $array[, string $message = '']) [19:50:00] Reedy: ^ [19:50:35] bah we really need badges [19:50:46] I could give marktraceur a "testing stuff" one :-] [19:50:56] and sam too :) [19:51:42] Still gives an undefined index error for "Module prefix '{$prefix}' is shared between {$class} and {$prefixes[$prefix]}" due to teh last bit.. [19:53:16] so that is the message having an undefined key obviously [19:53:16] Oh [19:53:20] I see [19:53:30] Can it accept a delegate for what to call to get the message if it fails? :p [19:53:33] Reedy: PHP is trying to expand the variables in your string [19:53:39] Reedy: Escape the $ [19:54:39] All of them? [19:55:27] simply state that "$prefix is expected to be found in the list of prefixes" [19:55:55] you can't reference $prefixes[$prefix] since the message is shown when it does not exist :-) [19:56:06] well, then the developer has to work out where it's in use [19:56:14] i could wrap the building of the message in an isset itself [19:56:16] * Reedy barfs [19:56:27] grr [19:56:33] we need an ether pad with syntax highlighting [19:56:39] that would make that stuff easier [19:56:40] orrr [19:56:47] we can Skype and screen share :-] [19:57:12] Module prefix 'cl' is shared between ApiQueryCategories and {$prefixes[$prefix]} [19:58:24] $message = ''; [19:58:24] if ( isset( $prefixes[$prefix] ) ) { [19:58:24] $message = "Module prefix '{$prefix}' is shared between {$class} and {$prefixes[$prefix]}"; [19:58:26] * Reedy facepalms [19:58:38] $this->assertArrayNotHasKey( $prefix, $prefixes, $message ); [19:59:06] replacing the last bit with "and another class" decreases its usefulness [19:59:40] Reedy: wanna screen share over Skype ? [19:59:43] or hangout [19:59:45] or pigeons [20:00:16] $this->assertArrayNotHasKey( $prefix, $prefixes, [20:00:17] isset( $prefixes[$prefix] ) [20:00:17] ? "Module prefix '{$prefix}' is shared between {$class} and {$prefixes[$prefix]}" [20:00:17] : '' [20:00:17] ); [20:00:20] I.. [20:00:21] if using pigeon, please print your code with a color printer so I received a syntax highlighted copy of your code [20:00:34] I only own colour printers ;) [20:04:22] * hashar send a pigeon to Sam [20:04:24] I think I'm gonna leave the code as is [20:04:45] It's not great, but it doesn't look as evil as doing something like that [20:04:55] or only then conditionally running the assert when we know it's going to fail [20:05:25] which is evil [20:05:26] ;) [20:05:32] Yeah [20:05:37] as I said on the comment, it get the stuff done [20:05:43] The current isn't great, but that's a lot worse [20:06:03] there is probably a nicer way to test that but it is probably not worth spending hours on it :) [20:06:19] Yup, exactly [20:06:24] Onwards with "proper" bugs [20:06:37] you still need to fix the first commit line :-) [20:06:49] 2nd line need to be empty or gerrit get lost :) [20:07:18] Now only if gitweb wasn't so crappy [20:09:22] it's quicker to push it to a github clone, and use that [20:09:28] Reedy: not sure if you're the right person, but I assigned https://bugzilla.wikimedia.org/40668 to you [20:09:36] Yeah, I'm just looking at it [20:09:59] Oh look, it's an already known bad commit [20:10:14] Reedy is fast :) [20:10:19] I think [20:10:21] https://github.com/reedy/MediaWiki/commit/0a1e291036fac2376b4645f9d070bc3e76ca73d4 [20:10:37] https://gerrit.wikimedia.org/r/#/c/25529/ [20:13:25] interesting. I would have had one day to discover that on beta labs, but instead I was working on hiring the guy to do the automation that would have discovered it (if we were looking for it). step by step by step... [20:14:02] Hmm, maybe not then.. [20:14:24] I figure it would have been visible on Friday, but maybe not. [20:14:33] Amusingly, if you logout, that message is correct [20:14:41] Return to MediaWiki. [20:14:56] and the tooltip/hover thingie is correct also [20:16:46] And (unsuprisingly) we apparently have multiple ways to add a return to.. [20:19:37] $link = $this->msg( 'returnto' )->rawParams( [20:19:37] Linker::link( $title, $text, array(), $query, $options ) )->escaped(); [20:19:41] that still looks likely [20:21:28] I should debug on testwiki, not mw.org [20:21:29] mehh [20:21:55] Linker::link( $title, $text, array(), $query, $options ) [20:21:58] returns Array [20:32:06] chrismcmahon: found it [20:32:10] $this->getOutput()->addReturnTo( $returnToTitle, $returnToQuery, $options ); [20:32:18] becomes to fix it [20:32:19] $this->getOutput()->addReturnTo( $returnToTitle, $returnToQuery, null, $options ); [20:33:24] Caused by https://github.com/reedy/MediaWiki/commit/565014a8cb578889de1666256d1dba6a7ecc8629 [20:39:04] Reedy: makes sense, thanks [20:47:44] ori-l: gwicke tells me you may need a hand with automated testing on the dumps, care to point me in the right direction? [20:48:26] marktraceur: subbu just brought up the same thing in #mediawiki-parsoid [20:48:50] gwicke: ori-l is not there, hence, the more different channel [20:58:06] I am out, see you later [22:54:46] Ryan_Lane: So we're setting up CI for Parsoid, and we'd like to SSH into Gerrit--but we may need a new user and/or to use the existing Jenkins user. If you have a good grasp of what to do, I'd like to hear it, my instinct is to create a new user (ParsoidJenkins or so) [22:55:11] doesn't jenkins already have a user? [22:55:24] Ryan_Lane: Yes, but this is going to be a new instance for now [22:55:28] new instance? [22:55:34] Ryan_Lane: Of Jenkins [22:55:37] please tell me you aren't planning on doing this from inside of labs [22:55:55] Ryan_Lane: We needed a newer version of Node, as I recall, than what was available on the current Jenkins [22:56:03] then we should look at upgrading [22:56:18] labs isn't intended for production work [22:56:20] K, how should I go about doing that? [22:56:30] Ryan_Lane: Parsoid isn't a production-grade product yet [22:56:36] but testing it is [22:56:50] The tests don't even pass, we're just trying to make sure we don't lose tests [22:56:59] doesn't matter [22:57:06] we have a testing server. in production. [22:57:29] marktraceur: you should work with hashar [22:57:29] Ryan_Lane: K, then let's do that. [22:57:33] he has a test instance in labs [22:57:39] the upgrade can be tested there [22:57:45] then we can upgrade production [22:57:45] Ryan_Lane: A) hashar is asleep B) hashar is doing other things this week [22:57:58] So reason 2 for doing this was so I could get it working sooner [22:58:08] well, this can't run in labs [22:58:21] from a security perspective it's not really OK [22:58:48] * marktraceur backs out from attempts [22:59:26] hashar manages jenkins.... [22:59:34] I don't know who can help on the ops side [22:59:43] no clue who's familiar with it [23:00:15] Well, I really don't need any help managing it, just a Gerrit user with Verify privs on the Parsoid repo. I have the rest set up. [23:06:40] Ryan_Lane: Wait, can I configure a job in Jenkins? There's an email from hashar that says people in our LDAP group can, but I'm not sure I have that... [23:07:11] I don't know [23:07:16] I don't really use jenkins much [23:07:37] Noted [23:07:39] marktraceur: it's not a matter of needing help managing it. it's that we need to make sure he's involved [23:08:00] it would suck to upgrade the production instance just to break everything and not have hashar around [23:08:28] I didn't intend to touch the production instance, until you freaked out and told me I couldn't run Jenkins on labs [23:08:42] it's not a matter of freaking out. It's against the policy [23:08:53] Now I feel all inelegant, have to run tests through a web interface [23:09:01] ...if I can log in, which I apparently can't [23:09:16] what's your labsconsole user name? [23:09:21] it uses that username/password [23:09:28] or well, it should [23:09:39] There we go, yes [23:09:44] Excellent [23:10:34] All right, hack it up to run tests on the labs instance, then I'll make a job. [23:10:54] heh. also shouldn't be running tests against the labs instance ;) [23:11:07] I'm not going to completely say no to that, though [23:11:35] Ryan_Lane: We don't have any other way to do it, so until we upgrade the production Jenkins, this is kind of it [23:11:36] in general we try to keep operational dependencies away from labs [23:11:43] yeah. it's fine for now [23:11:53] as you mentioned, parsoid isn't production yet [23:11:59] when it is, we need to have this solved [23:12:15] It should be solved within two weeks, but hashar isn't available to solve it yet [23:12:19] * Ryan_Lane nods [23:12:20] sounds good [23:12:53] I have to be kind of strict about stuff like this, or we'll end up with half of production relying on labs [23:13:19] and mark will want to kill me [23:14:44] Well, that's an awful idea [23:14:49] I agree [23:15:11] But the only place Parsoid is deployed is Labs, so I didn't figure it was an issue....*shrug* this should work, I guess [23:15:24] * Ryan_Lane nods