[15:10:17] I have been using bats for testing our mail infrasture, I came across this and thought it looked interesting for testing kubernetes, https://github.com/bats-core/bats-detik, I haven't tried it yet however [15:16:38] hnowlan: hello! for T211661, some small changes may be necessary for thumbor. I'd prefer not to be blocked on the big migration to Thumbor 7 / Python 3 / deployment to k8s. what would you recommend as a strategy for rolling out a small change to thumbor when HEAD is already quite far from production? [15:16:38] T211661: Automatically clean up unused thumbnails in Swift - https://phabricator.wikimedia.org/T211661 [15:16:42] In less than 1h it is the Incident ritual for this week - about the database issue early this week - you should have already an invite in your calendar [15:27:04] ori: hi! I suppose one option is to fork off from the last point we deployed to prod and merge changes there before building a package to deploy from it. Not particularly clean but given that HEAD has moved along so significantly. What time frame would you like to have this out within? [15:28:49] hnowlan: within the next two weeks, ideally. [15:36:20] <_joe_> yeah I'd second what hugh just said [16:04:35] (nothing to report oncall-wise) [16:27:26] thanks! [16:36:22] I know we have style guidelines for puppet, but do we have some for other components like python or bash? [16:40:22] brett: i dont think so and i think that different repos have different CI rules. the closest thing im aware of for python is https://phabricator.wikimedia.org/T211750 [16:44:23] jbond: Thanks for that. This does seem like what could be a section of a document. If different repos have different standards, that could prevent any meaningful wikitech Python/Style Guidelines page [16:49:26] brett i belive there is a desire to create some standard accross the foundation (with whatever black does being the front runner) and the fact that there are currently differences is more a state of evolution in an environment without a ratified guide. so i dont think you would get a lot of resistence (famous last words) if you tried to create a guide [16:49:57] <_joe_> jbond: I think brett meant something besides formatting [16:50:39] <_joe_> brett: using black for formatting python, with 100/120 line width has rough consensus [16:52:28] <_joe_> as for shell, I would guess the style guide is along the lines of "no shellcheck warnings; use set -euo pipefail unelss there are good reasons not to; if it's over 50 lines rewrite in python" :P [16:53:20] <_joe_> although i prefer "if you need nested conditionals, rewrite in python" as a condition [16:54:16] Hm, I'd prefer something more specific than just "use black" since black can be configured in different ways (I imagine) [16:54:30] In any case, would it be of any value to have a Style Guidelines document for the various languages? [16:54:39] <_joe_> brett: absolutely [16:54:56] _joe_: ack. brett yes i think if you are bold and create something it would be welcomed [16:59:10] <_joe_> brett: mark the pages as drafts [16:59:18] <_joe_> {{draft}} iirc [16:59:48] <_joe_> so it's clear to everyone we're still refining them [16:59:52] ack [17:01:24] I am all for creating a standard- I am not super happy with black's default- I did a patch recently on a project that used it and it made my code ~10% slower :-( [17:02:04] I'm of the opinion of using black as a tool to achieve the standards we would set rather than just cargo-culting its own opinions as our own [17:02:04] what was the change that caused that? [17:02:12] brett: +1 [17:02:37] claime: asking me or someone else? [17:02:51] jynus: sorry missed my hilight, asking you yeah [17:03:00] Just curiosity honestly [17:03:27] it was a parsing-heavy project for Godot tooling (generating rst documentation) [17:03:34] not WMF-related [17:03:52] double quotes made the parsing or regex much slower [17:03:55] than single quotes [17:03:59] wut [17:04:02] That's... [17:04:13] Yeah, I guess they go through interpolation if " [17:04:17] And not if ' [17:04:20] that would be my guess [17:04:33] it was code that was run thousands of millions of times [17:04:43] Those 10% matter [17:04:51] and yes, if I want speed, it should probably be C [17:05:29] But in that case I mean, it's justifiable to exclude this particular file/project from this black rule [17:05:52] That circles back to not cargo-culting :p [17:05:53] so not against black as a tool, but as the default as the standard to follow (I imagine it is highly configurable) [17:06:25] jynus: You can use it as a reasonable set of defaults, and exclude when needed , like all linters/formaters [17:06:52] I mean in our puppet repos we have some exclusion for line-lengths for some stuff, etc. [17:07:39] But I agree this needs discussion, so {{draft}} :p [17:07:50] to be fair, it wouldn't have impacted most of my wmf projects, 90% of my python ends up calling C executables for the critical paths [17:07:52] When it's exclusion time is it based on need or based on "I don't wanna fix the problem"? :-^ [17:08:26] brett: I don't have enough experience right now to tell you :) [17:08:30] :D [17:08:46] But an example I've seen is for ssh public keys for instance [17:08:57] ? [17:09:10] You may not want to have to do a blockquote instead of just excluding that long string from the line-length rule [17:09:38] Clearly it should just be 20 lines that are all concatenated /s [17:09:40] well, I would wonder why a key should be on code in the first place :-D [17:09:43] Not a WMF example btw. [17:10:17] jynus: you have style guides and linting for configuration/data files too [17:10:19] :p [17:10:32] oh, that may be too much... [17:11:12] brett: clearly :') [17:11:35] Hi topranks , is it okay to merge this changes? 'Cathal Mooney: doc: redirect /mw-tools-scap/ to /scap/ (2d05626611)' [17:11:37] I think we discussed some time ago what to do when upstream stuff didn't follow our style [17:12:00] denisse|m: Yep I only just hit the button bad timing [17:12:14] Feel free to go ahead and merge [17:12:15] topranks: No problem, I'll merge it. Thank you. :) [17:12:39] Done, thank you. :) [17:14:35] the other issue we had, and that was our fault, was that for some time we used to lint python3 with a python2 linter, or something like that? Or a very old python3 linter [17:14:53] ahahaha, that's funny [17:15:03] I can only imagine the person's face when they discovered that [17:15:19] so when I sent patches it was a lottery if a real faliure or an outdated CI output [17:15:27] "why is it letting through print without () wth" [17:16:33] it was something more subtle, like abstract classes and methods or exceptions moved from standard library to another library [17:23:09] I've started something bare here: https://wikitech.wikimedia.org/wiki/Style_guidelines [17:24:06] thank you topranks to have taken care of my change as part of clinic duty. That has almost completed my pet project of the day! [17:24:49] anytime - clinic duty or otherwise :) [17:31:41] <_joe_> A linter and a formatter are two very different things. I want a formatter to allow me not to care about formatting code while I write it, more or less. gofmt, with its ugly face (I called go a brutalist programming language the other day), is one of go's best features [17:32:06] <_joe_> the code looks ugly but consistently ugly, without any effort on my part :) [17:32:39] <_joe_> (that is a reference to https://en.wikipedia.org/wiki/Brutalist_architecture ) [17:33:51] <_joe_> for linters, we get more in the space of style guides imho - and I would care more about personalizing them [17:34:19] indeed, shfmt radically changed my enjoyment of writing bash code [17:34:41] <_joe_> for instance, I once decided to write ruby code according to the "agreed upon best practices" as defined by rubocop, and I deeply hated it [17:35:24] <_joe_> it forced upon me that style of programming with 3 line methods that I really don't like (it also makes your code slower, and it was already ruby to begin with) [17:36:40] <_joe_> all this to say I am more interested in tuning pylint than in tuning black :) [17:37:00] <_joe_> jhathaway: oh yes indeed. [17:37:13] <_joe_> jhathaway: so, by definition, shfmt is a tool of evil [17:37:19] <_joe_> :D [17:37:26] very true :) [17:38:30] however, if black makes code slower, that seems like a bug in black, rather than a debatable default [17:38:41] <_joe_> ah definitely [17:54:52] Regardless, I didn't do anything with Python at the moment on https://wikitech.wikimedia.org/wiki/Style_guidelines but I did add Shell, git, and a link to the puppet style guidelines [17:55:00] I did open a talk discussion [18:10:18] <_joe_> brett: <3 that's awesome thank you [18:21:56] thanks brett! Would you prefer differences of opinion discussed on the talk page, or edit boldly? [18:22:09] edit boldly, I'd say [18:22:16] unless you think it'd be controversial [18:22:27] most style guides are :) [18:22:47] I don't much care what the standards are, just that I can be confident that I'm writing something that is readable and predictable [18:23:19] unless it's two-space indentation, that I cannot abide [18:23:32] for sure, I think your advice is good, with regard to editing, I'll put controversial edits in the discussion [18:23:34] :P [18:24:02] spoiler alert: Well if you use tabs, everyone can choose their own number of spaces :P [18:24:25] always a good point in favor of tabs. I find myself to appreciate both flavors ^^ [18:25:28] finding the `tabs` command changed my shell experience for the better, `tabs -4` is what I put in my bashrc [18:32:29] Hm, I did not know that one. In what way did it make things better? [18:32:33] jhathaway: [18:33:10] it changes the number of columns used by your terminal for tabs [18:33:31] so for example using git diff, you would see your preferred number of columns for tabs [18:33:48] oh nice [18:34:42] try `tabs -8; printf '|\t|\n'; tabs -4; printf '|\t|\n'` [18:34:45] as an example [18:40:29] I see. Does it not default to 4? [18:41:18] oh, looks like it defaults to 8. I prefer that :) [18:41:41] But it's good to know that's so easily configured [18:42:41] :), I just like to keep it consistent with my editor, so git diffs and the like look the same [18:42:47] makes sense [19:02:33] Is there anyone around who knows a bit about reprepro to review https://gerrit.wikimedia.org/r/c/operations/puppet/+/824551 ? [22:17:12] mediawiki core frontend bug probably introduced by the train today. besides filing this phab ticket, anything further I need to do? https://phabricator.wikimedia.org/T315620 [22:19:33] dancy, ^demon: ^ [22:19:42] That's a fairly major regression imo [22:20:13] Reedy: you just tagged as a blocker so rollback worthy? [22:20:29] NovemLinguae: thanks for flagging it [22:20:53] RhinosF1: I'm not quite sure, but at least starts getting it infront of the "right" people [22:21:12] RhinosF1: yw :) [22:21:39] Reedy: I'm pretty 50/50 [22:22:14] o/ [22:22:31] dancy: what qualifies as rollback worthy? [22:23:53] The official policy is https://wikitech.wikimedia.org/wiki/Deployments/Holding_the_train [22:24:34] This probably qualified as "Major stylistic problems affecting all pages" ? [22:24:51] dancy: id say it does personally [22:25:00] But I do not feel qualified to make that call [22:25:12] I will roll back to group1 for the time being. [22:29:01] My internet is refusing to play ball so I'm gonna sleep [22:29:11] Good time to die BT [22:29:25] It's getting to maintenance o'clock [22:30:13] Reedy: it randomly died on me and connecting to wifi just shows an SSL error [22:30:22] Safari allows me to get troubleshoot [22:30:35] But I'm too lazy to go downstairs when I'm already in bed and do so [22:30:55] I'll wake up before anyone else does in the morning [22:31:01] And it's broken then, I'll fix it [22:33:19] * RhinosF1 wonders why a WhatsApp too [22:35:53] good sleep RhinosF1 :) [22:36:39] hauskatze: you assume I sleep when I say! [22:36:47] * RhinosF1 will not sleep for another half an hour [22:37:24] well, I'd assume you'd sleep at some point in the future, and I wish it's good [22:37:55] at least I can now that the weather got colder [22:38:17] It's definitely cooler than last week [23:11:45] So how's it work when a train is rolled back late in the day? Will that backport be rolled back, everything tested, then train restored today? [23:12:07] (The backport mentioned in the ticket by Legoktm is the likely cause, just need to do some testing I imagine) [23:12:48] I was just deployed [23:12:59] *it [23:14:28] looks like backport was reverted but train has not bee re-deployed [23:14:48] see #wikimedia-operations [23:14:54] Noting it take a little bit of time ;) [23:15:41] gotchya. thanks. will be nice to get my patches back. been waiting weeks for them :) [23:21:00] NovemLinguae: FYI wmf.25 is on all wikis again. [23:21:14] thank you :)