[00:04:26] ==> default: Notice: /Stage[main]/Php::Composer/Exec[update_composer]/returns: The "https://getcomposer.org/versions" file could not be downloaded: Array to string conversion [00:04:50] silly thing [01:09:43] Sagan: if I run puppet on your instance, it does error out [01:09:48] https://www.irccloud.com/pastebin/JTEOM8yI/ [01:13:01] bd808: as the in house expert on mediawiki vagrant, does the above error ring familiar to you? [01:15:02] maybe try running $ vagrant plugin install vagrant-lxc; alone to get an error message? [01:19:59] I’m going to guess that it’s a dns or connectivity error, but that’s just a guess [01:21:42] I did provision mw-vagrant on a jessie instance last week. So the code hasn’t completely rotted [02:30:48] some how today, using localhost on an instance is failing [02:31:02] i was proxying http through apache to gerrit [02:31:19] which has been working for the past year, and sundely it stopped working [02:31:28] using 127.0.0.1 fixes the problem [02:31:34] so maybe a ipv6 problem? [05:42:55] legoktm: I did try that, but that succeeds and says it's installed [05:43:08] o.O that's weird [05:44:40] yeah [08:49:35] (03PS7) 10Lokal Profil: Restructure missing_commonscat_links [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/380060 (https://phabricator.wikimedia.org/T176528) [08:51:35] (03CR) 10jerkins-bot: [V: 04-1] Restructure missing_commonscat_links [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/380060 (https://phabricator.wikimedia.org/T176528) (owner: 10Lokal Profil) [10:34:43] (03PS8) 10Lokal Profil: Restructure missing_commonscat_links [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/380060 (https://phabricator.wikimedia.org/T176528) [13:49:23] (03Restored) 10Hashar: Jenkins job validation (DO NOT SUBMIT) [labs/toollabs] - 10https://gerrit.wikimedia.org/r/104917 (owner: 10Hashar) [13:49:31] (03PS2) 10Hashar: Jenkins job validation (DO NOT SUBMIT) [labs/toollabs] - 10https://gerrit.wikimedia.org/r/104917 [13:49:42] (03CR) 10Hashar: "check experimental" [labs/toollabs] - 10https://gerrit.wikimedia.org/r/104917 (owner: 10Hashar) [13:51:00] (03Abandoned) 10Hashar: Jenkins job validation (DO NOT SUBMIT) [labs/toollabs] - 10https://gerrit.wikimedia.org/r/104917 (owner: 10Hashar) [15:29:16] I have a question. Is there some way that I can connect my tool at "https://tools.wmflabs.org/dawiki/" to the gerrit project https://gerrit.wikimedia.org/r/#/admin/projects/labs/tools/dawiki ? [15:38:57] !help ^ [15:38:57] SimmeD: 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 [15:39:16] SimmeD: we are all in a meeting for a bit, I bet someone pops up to answer in a bit [15:39:45] Oh, okay. I'll be here. [15:49:44] (03PS1) 10SimmeD: Initial commit [labs/tools/dawiki] - 10https://gerrit.wikimedia.org/r/387595 [15:52:34] (03CR) 10SimmeD: [V: 032 C: 032] Initial commit [labs/tools/dawiki] - 10https://gerrit.wikimedia.org/r/387595 (owner: 10SimmeD) [16:13:26] SimmeD: Are looking for some kind of automated deployment from the gerrit repo? If so, the answer is that we do not have any specific system to do that for Toolforge users. [16:14:39] There are some creative deployment solutions that people have come up with. You might send out a message on the cloud@lists.wikimedia.org mailing list asking people to tell you about their deployment workflows. [16:15:06] It would be nice to get a list of such things on a wikitech help page somewhere :) [16:24:19] bd808: It there not a way to add jenkensbot? [16:25:29] SimmeD: no. Its something that could be figured out I think, but its not trivial and there is no current solution for it. [16:26:04] Oh okay. I'll found out something i think. [16:27:04] To have jenkins trigger things we would need to make some host in Toolforge that is also a Jenkins exec host. We'd also need to make a user that Jenkins could control that could be added to a tool as a co-maintainer. [16:27:29] Then there would need to be custom jobs for each tool that scripted the code update and service restart [16:27:41] it's all possible, but not currently something that exists [16:28:32] I think there are a tools that use webhooks to trigger updates. Those could be automated from the GitHub clone of a repo [16:30:44] One of the hard parts for this is the diversity of workflows in Toolforge [16:30:59] * bd808 feels like he's given this description in the not too distant past... [16:39:52] Hi all. Error when using fgets on stdin file. loads way too long and has null response. [16:40:41] https://pastebin.com/zJm9UFd8 [16:41:38] DatGuy: that is code for interactive command line use [16:41:59] its a trivial example, not something to be used in a live tool really [16:42:03] php docs aren't too helpful [16:42:38] http://php.net/manual/en/features.commandline.io-streams.php is the closest I could find, but also mentions command line usage [16:45:10] DatGuy: I agree. I ported the docs from another example but they are not a good tutorial for someone who does not already understand most of what is happening. [16:46:14] I'd like to find time to work on a PHP version of https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Flask_OAuth_tool [16:46:37] uh, toolforge? [16:46:38] not responding [16:46:50] well it is responding, just in short bursts every now and then [16:47:13] web interface or ssh session or ? [16:47:21] I need more details to help debug [16:47:24] ssh session [16:47:29] both in winscp + bash [16:47:38] which server are you connected to? [16:47:58] login.tools.wmflabs.org ? [16:48:06] or do you mean tools-bastion-03 [16:48:10] ok. Trying to connect now. [16:48:18] Looks like it is probably overloaded [16:48:47] people run things directly on the bastion and use up all of the CPU and/or NFS bandwidth [16:49:24] DatGuy: for now, try connecting to tools-dev.wmflabs.org instead [16:49:48] alright, thanks [16:50:12] !log tools tools-bastion-03 (tools-login, login.tools) is overloaded [16:50:15] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/SAL [16:51:39] bd808: anyways, not for command line, what would it be? trim( fgets( STDIN ) ) ? [16:52:46] DatGuy: no, it would be reading data from $_GET [16:53:22] uh [16:53:27] I might've been doing a stupid this whole time [16:53:37] getting the $_GET stuff [16:53:44] and also trying to use stdin... [16:53:57] seems like it according to my pbin https://pastebin.com/zJm9UFd8 ... [16:54:03] !trout DatGuy [16:54:52] heh. yeah you are reading from $_GET and then doing the fake web post cli stuff as well ;) [16:59:30] another thing that I'm pretty sure I'm not defining twice is using $client from one file to the next. would I use _SESSION for that? [16:59:47] https://pastebin.com/vBBcrhDQ [17:03:24] DatGuy: you should just create the client instance wherever you need it. [17:04:15] would I need to reassign all the parameters (sorry, not versed in php) [17:04:41] yeah. Is there a language that you are more familiar with? [17:05:05] PHP has a notion of "shared nothing" which typically means that no object persist between requests [17:05:10] more used to the basic python [17:05:24] so each page view sets up and tears down all of the code needed [17:05:31] got it [17:05:51] Is there a reason you are using the PHP library instead of one of the python libraries? [17:05:53] and then there's some variables that stick like $_SESSION and include stuff? [17:06:00] Would that make all your problems easier? [17:06:06] bd808: wanted to try out using php for once [17:06:21] I know it's annoyed you a lot with all of my questions :P [17:06:41] yes, $_SESSION is the place where you can store data that you need to carry from request to request on the backend [17:07:08] Its not a good place to try and store live objects however [17:07:56] $_SESSION actually gets written to a file on disk at the end of the user's request and then read back based on the session cookie at the start of each new request [17:08:56] this differs from a typical wsgi app lifecycle where session storage is done in a cookie sent to the user or redis or some other data store [17:11:37] bd808: got a sec for a non-cloud q? [17:12:12] hexmode: maybe. Or maybe I'll turn it into a Cloud answer. :) [17:12:16] what's up? [17:12:20] heh [17:13:02] do you know where the code is for Reading's PDF effort? [17:13:42] (I asked in #wikimedia-dev, so you weren't my first stop...) [17:14:02] https://www.mediawiki.org/wiki/Reading/Web/PDF_Functionality [17:14:40] nm, lego helped [17:15:16] hexmode: cool. I haven't followed that project at all :) [17:21:14] (03PS1) 10SimmeD: Added files and style [labs/tools/dawiki] - 10https://gerrit.wikimedia.org/r/387612 [17:21:48] (03CR) 10SimmeD: [V: 032 C: 032] "Will be deployed now." [labs/tools/dawiki] - 10https://gerrit.wikimedia.org/r/387612 (owner: 10SimmeD) [17:41:02] bd808: complete() requires a Token $requestToken. since I'm using GET, then php uses it as a string. how do I cast it as a token? [17:42:51] DatGuy: new MediaWiki\OAuthClient\Token( $key, $secret ) [17:45:19] DatGuy: this usage of the library may or may not help make things more clear -- https://github.com/bd808/quips/blob/master/src/Pages/OAuth.php [17:47:19] You can hopefully see how it stores the key and secret in $_SESSION after running initiate() and then pulls them back out of the session when the visitor returns to the callback url with the signed data from the OAuth server [17:56:17] bd808: might me another command line thing, but $client->complete( $requestToken, $verifyCode ); [17:56:17] results in a default $accessToken (oauth_token=&oauth_token_secret=) [18:01:23] DatGuy: how did you make $requestToken? [18:01:39] what you said above [18:01:42] $requestToken = new MediaWiki\OAuthClient\Token( $consumerKey, $consumerSecret ); [18:02:40] and where did $consumerKey, $consumerSecret come from? [18:03:00] did you pull data from the $_SESSION that you had stored on the first request? [18:05:21] .ini file [18:05:40] the verifyCode was from GET [18:06:03] didn't pull any session data because you mentioned making a new Token [18:14:05] consumer key and secret have nothing to do with the request token [18:14:33] you use the consumer key and secret to sign leg 1 of the OAuth handshake [18:14:53] in response, you get the request token and secret from the server [18:15:09] then you use the request token and secret to sign leg 3 [18:15:56] (the terminology is a bit confusing I suppose since what the library calls Token is actually a token+secret pair) [18:27:52] tgr: so I get the $token element in the array that initiate() returns, put it in _SESSION, then reuse that for complete() ? [18:28:58] DatGuy: yeah, you need to preserve it somehow [18:29:20] so list( $next, $token ) = $client->initiate(); $_SESSION['token'] = token; *new file* $client->complete( $_SESSION['token'], $oauth_verifier); [18:30:31] yeah [18:31:15] although you should probably check if it exists first, the user might keep the authorization dialog open so long that the session expires [18:49:28] tgr: Object of class __PHP_Incomplete_Class could not be converted to string [19:18:06] DatGuy: sounds like an autoloading problem [19:18:42] currently doing https://pastebin.com/FL610vdK [19:47:35] tgr: what would you suggest changing? [20:01:13] (03PS185) 10Ricordisamoa: Initial commit [labs/tools/wikidata-slicer] - 10https://gerrit.wikimedia.org/r/241296 [20:05:31] DatGhost: don't put the object directly in the session. Put the data that you can use to recreate it there instead. Example -- https://github.com/bd808/quips/blob/master/src/Pages/OAuth.php#L73 [20:05:34] DatGhost: not sure - that code looks correct, but __PHP_Incomplete_Class means PHP could not unserialize the object from the session because it did not have the class available [20:06:06] and then on the return -- https://github.com/bd808/quips/blob/master/src/Pages/OAuth.php#L94-L96 [20:06:58] (03CR) 10Ricordisamoa: [C: 04-2] "PS185 adds some JSDoc types" [labs/tools/wikidata-slicer] - 10https://gerrit.wikimedia.org/r/241296 (owner: 10Ricordisamoa) [20:07:17] bd808: hm, so you mean I should do initiate() again? [20:08:16] no. on the return you just need to create a Token object with the key and secret that you persisted in the session [20:08:52] so on the page where you initiate, save the parts of the token to the session [20:09:05] and then on the return page make a new token using that saved data [20:11:06] bd808: so save oauth_token and oauth_token_secret, then make a new Token object using those two, right? [20:11:55] save $token->key and $token->secret from the token that you get out of client->initiate [20:12:15] rather than trying to save $token as an object [20:18:10] bd808: https://pastebin.com/2ri2n61r ? [20:19:59] DatGhost: you don't need to to_string() the token and then capture the parts. The object has has public members: https://github.com/wikimedia/mediawiki-oauthclient-php/blob/master/src/Token.php#L34-L43 [20:20:19] oh [20:20:59] newbie question, it'll be just $token->key ? [20:21:05] correct [20:21:09] (03PS186) 10Ricordisamoa: Initial commit [labs/tools/wikidata-slicer] - 10https://gerrit.wikimedia.org/r/241296 [20:21:32] that's nice [20:21:34] thank you! [20:21:38] yw [20:21:51] I think I'm mostly done with OAuth and won't annoy you and other helpers here anymore :D [20:21:57] happy Halloween [20:22:05] Now I feel like one of us needs to make a better tutorial for this php library :) [20:22:42] I could make an error filled one for you to kind fix [20:22:53] DatGhost: out of curiosity, what are you using OAuthClient with? [20:22:53] that would be a start :) [20:23:07] is the rest of the tool handwritten? [20:24:02] you mean what it's for? [20:24:09] yeah I'm working on it [20:24:20] I mean, are you using some kind of PHP framework? [20:24:23] (03CR) 10Hashar: "check experimental" [labs/libraryupgrader] - 10https://gerrit.wikimedia.org/r/386566 (owner: 10Legoktm) [20:24:26] Slim or whatever [20:24:28] not really [20:24:35] vanilla php5.6 [20:24:46] (03CR) 10jenkins-bot: Add integration/docroot [labs/libraryupgrader] - 10https://gerrit.wikimedia.org/r/386566 (owner: 10Legoktm) [20:25:05] (03CR) 10Hashar: "check experimental" [labs/striker] - 10https://gerrit.wikimedia.org/r/387068 (owner: 10BryanDavis) [20:25:34] maybe we should just have an example oauth.php file that can be dropped into handwritten applications [20:25:38] just getting into php. trying to learn it slowly but surely [20:26:00] (03CR) 10Hashar: "check experimental" [labs/tools/crosswatch] - 10https://gerrit.wikimedia.org/r/386768 (owner: 10L10n-bot) [20:26:09] I'll try and make a very basic (and probably still littered with issues) one tomorrow in my wikitech sandbox [20:26:18] (03CR) 10Hashar: "check experimental" [labs/tools/extdist] - 10https://gerrit.wikimedia.org/r/366414 (https://phabricator.wikimedia.org/T135194) (owner: 10Legoktm) [20:26:19] just drop some config array into the session, redirect to oauth.php, wait until you get redirected back, read user data from the session [20:26:31] tgr: yeah, that's what I'm thinking would be helpful. The current doc on that library is a cli toy more than a real usage [20:26:32] (03CR) 10jenkins-bot: Localisation updates from https://translatewiki.net. [labs/tools/crosswatch] - 10https://gerrit.wikimedia.org/r/386768 (owner: 10L10n-bot) [20:26:34] (03CR) 10Hashar: "check experimental" [labs/tools/forrestbot] - 10https://gerrit.wikimedia.org/r/377816 (https://phabricator.wikimedia.org/T175626) (owner: 10Merlijn van Deen) [20:26:40] (03CR) 10jenkins-bot: De-reference symlinks in tarball [labs/tools/extdist] - 10https://gerrit.wikimedia.org/r/366414 (https://phabricator.wikimedia.org/T135194) (owner: 10Legoktm) [20:27:01] (03CR) 10jenkins-bot: Make sure get_master_branches returns a list [labs/tools/forrestbot] - 10https://gerrit.wikimedia.org/r/377816 (https://phabricator.wikimedia.org/T175626) (owner: 10Merlijn van Deen) [20:27:32] (03CR) 10Hashar: "check experimental" [labs/tools/gblrenamemon] - 10https://gerrit.wikimedia.org/r/150773 (owner: 10Hashar) [20:27:34] (03CR) 10Ricordisamoa: [C: 04-2] "PS186 flattens DragHelper config object" [labs/tools/wikidata-slicer] - 10https://gerrit.wikimedia.org/r/241296 (owner: 10Ricordisamoa) [20:27:43] I think its really a port of Brad's manual example to use the library instead. Sort of useful but really only if you started doing it all yourself from that example. [20:27:47] (03CR) 10Hashar: "check experimental" [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/387171 (owner: 10L10n-bot) [20:27:52] (03CR) 10jenkins-bot: Jenkins job validation (DO NOT SUBMIT) [labs/tools/gblrenamemon] - 10https://gerrit.wikimedia.org/r/150773 (owner: 10Hashar) [20:28:08] bd808: wanna file a task? now that the outreachy application period is over, suddenly I have free time again :) [20:28:30] (03CR) 10jenkins-bot: Localisation updates from https://translatewiki.net. [labs/tools/heritage] - 10https://gerrit.wikimedia.org/r/387171 (owner: 10L10n-bot) [20:28:35] tgr: sure :) do you want it in phab somewhere or on github? [20:29:04] phab [20:29:48] oauthclient-php is hosted in gerrit [20:29:49] (03CR) 10Hashar: "check experimental" [labs/tools/ptable] - 10https://gerrit.wikimedia.org/r/383576 (owner: 10ArthurPSmith) [20:29:53] (03CR) 10Hashar: "check experimental" [labs/tools/stashbot] - 10https://gerrit.wikimedia.org/r/382642 (owner: 10BryanDavis) [20:30:12] (and tracked under MediaWiki-extensions-OAuth in phab, I think) [20:30:20] (03CR) 10Hashar: "check experimental" [labs/tools/stewardbots] - 10https://gerrit.wikimedia.org/r/385816 (owner: 10MarcoAurelio) [20:30:27] (03CR) 10jenkins-bot: Group 1 ID has changed due to a merge [labs/tools/ptable] - 10https://gerrit.wikimedia.org/r/383576 (owner: 10ArthurPSmith) [20:30:31] I don't think we have a phab component for it, but I'll tag it #toolforge and #-ext-oauth [20:30:38] (03CR) 10jenkins-bot: Update composer.json to use MediaWiki CodeSniffer 14.1.0 [labs/tools/stewardbots] - 10https://gerrit.wikimedia.org/r/385816 (owner: 10MarcoAurelio) [20:30:47] (03CR) 10Hashar: "check experimental" [labs/tools/wikibugs2] - 10https://gerrit.wikimedia.org/r/385103 (owner: 10Awight) [20:30:57] ext-oauth is sort of official, it's linked from the mw.org page [20:31:11] (03CR) 10jenkins-bot: Add more ORES repos [labs/tools/wikibugs2] - 10https://gerrit.wikimedia.org/r/385103 (owner: 10Awight) [20:31:18] (03CR) 10Hashar: "check experimental" [labs/tools/wikidata-slicer] - 10https://gerrit.wikimedia.org/r/241296 (owner: 10Ricordisamoa) [20:31:21] (03CR) 10jenkins-bot: Only ignore phab mentions [labs/tools/stashbot] - 10https://gerrit.wikimedia.org/r/382642 (owner: 10BryanDavis) [20:32:07] OTOH maybe it should have its own project if it's sort of recommended for Toolforge [20:34:12] T179435 [20:34:13] T179435: Include a vanilla PHP usage example that can be dropped into a Toolforge tool or similar project - https://phabricator.wikimedia.org/T179435 [20:35:14] bd808: do you have the rights to change the description for https://github.com/wikimedia/mediawiki-oauthclient-php ? [20:35:49] yeah. I can fix *or* I can pass on super powers to you :) [20:37:02] tgr: if you enable 2fa at github I can make you an org admin [20:37:47] for now I gave you admin on that repo itself [20:38:31] uhh [20:38:45] what's the recovery method for GitHub 2FA? :) [20:39:02] "have a printout of the keys" [20:39:22] which is pretty much the universal 2fa recovery method [20:39:39] yeah, well [20:39:51] that works a lot better when you live in one place [20:40:05] I have a tendency to lose stuff like that [20:40:20] :) true. I keep mine in my password manager [20:40:53] if I lose the ability to get into that I'm screwed and ready to start a new career anyway [20:41:07] :) true [20:41:36] looks like they have some kind of human-assisted Facebook-based account recovery process, actually [20:42:07] I think Chad tried and failed to get that to work for him at some point [20:45:03] https://developers.facebook.com/docs/delegated-recovery/ [20:45:07] interesting [20:45:16] there should be a MediaWiki extension for that [20:45:28] once it is out of closed beta, anyway [20:45:32] meh [20:45:53] making Facebook the source of all authn truth in the universe is not exciting to me [20:49:10] human-assisted is the nice part [20:49:30] hacking your FB account does not give access to your GH account [20:50:20] for Wikimedia we use "find a staff member you know IRL" for account recovery, Facebook probably scales better than that [20:50:42] very true [20:52:24] it seems to use the same logic as those identity hash userpage templates, just a bit more user-friendly [20:53:32] generate a proof token, send it to FB for storage, the account owner can send it back and it can serve as proof of identity, without having to link your FB account with the downstream account [20:56:29] I have set up 2FA [21:03:17] what's the sanest URL to link from the github description? [21:03:35] does https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/oauthclient-php even work if you are not an admin? [21:04:19] I guess mw.org is the least bad [21:08:25] Is labs login down (through ssh) ? [21:09:48] or maybe just very very slow [21:11:31] sigh. drive bys with no details and then an immediate part [21:13:06] tgr /admin/ can be accessed by any one :) [21:13:20] though projects can be hidden. [21:14:13] tgr: links to gerrit from the GitHub UI are pretty useless IMO. [21:14:55] It would be interesting to see if we could adopt a "standard" CONTRIBUTING doc for each repo that tells a bit more about how to submit patches instead [21:15:03] neither gerrit nor phabricator has a sane project page that would be useful as a landing page [21:15:12] yeah [21:15:19] just in the process of writing a task for that :) [21:15:40] or finding the one I wrote some time ago [21:15:42] I saw a good one the other day... where was it [21:15:59] https://github.com/eggpi/citationhunt/blob/master/CONTRIBUTING.md [21:16:14] recently I learnt that you can put it into .github/CONTRIBUTING if you don't want to pollute the root directory [21:16:33] and github will still display the extra text on top of the repo [21:16:50] yeah [21:17:19] you can put the code of conduct and issue templates in there too [21:18:24] bd808: mentioned it in https://phabricator.wikimedia.org/T136863