17:00:02 #startmeeting Testing Working Group 17:00:02 Meeting started Thu Jan 26 17:00:02 2017 UTC. The chair is gundalow. Information about MeetBot at http://wiki.debian.org/MeetBot. 17:00:02 Useful Commands: #action #agreed #halp #info #idea #link #topic. 17:00:02 The meeting name has been set to 'testing_working_group' 17:00:06 #chair mattclay gundalow 17:00:06 Current chairs: gundalow mattclay 17:00:09 * gundalow waves 17:01:16 * mattclay waves 17:03:44 #topic Core Team Update 17:03:45 oh, hay 17:04:03 maybe what I was going to talk to gundalow about might be best for this meeting 17:04:28 but I'll defer until we have discussed anythign on the agenda 17:04:50 So from my side, I'm looking at putting in testing for the new "Persistent Connection Manager" bits that are going into Ansible 2.3 to speed up talking to network devices 17:05:24 Will most likely do something similar to the existing targets/connection_paramiko_ssh tests 17:05:40 Slow progress due to fighting bugs, though that's what I'm here for 17:06:28 IOS tests are live (thanks again to mattclay for all his help with that), waiting for development to catchup before enabling tests for Junos, VyOS 17:07:06 mattclay: Anything you'd like to add? 17:07:45 I know we've had some issues with AWS in Shippable over the last day or so, we are waiting for Amazon to tweak something (I forget the term) 17:07:49 I'm continuing to enable more tests for OS X and FreeBSD. Unfortunately this does cause tests to take longer on those platforms. 17:08:31 I'm also working on test reliability issues around our EC2 usage. I had moved our Windows tests over from us-east-1 to us-east-2, but forgot we didn't have increased instance limits there, so I've moved things back until our limit increase request goes through. 17:09:13 That's it from me. 17:09:51 First steps on improving developing_modules.html are underway 17:10:05 https://github.com/ansible/ansible/pull/20673 17:10:23 my topic is related to that a bit 17:10:27 No content changed, just moved things around into separate files to make it easier to follow 17:10:38 over to you sivel :) 17:10:42 pep8 :) 17:10:55 I know you mentioned you and mattclay were talking about linting and whatnot 17:10:56 #topic Coding Guidelines 17:11:05 #topic Coding Guidelines & linting 17:11:27 I wanted to take a look to see what pep8 errors and warnings, were actually part of our style, and those that aren't 17:11:48 So I've spent several hours so, looking through pep8 output across the code base 17:12:04 and effectively have what I would currently consider the ignores that defined our current style 17:12:34 oh, ace 17:12:42 This is what I have thus far: https://gist.github.com/sivel/492697cd61f1b6960df1f76f249c3043 17:13:03 Those 30 ignores, are effectively thigns we do often in the code (that aren't dumb) :) 17:13:27 excluding modules, that totals around 500 places where we violate the guidelines 17:13:27 IMO E201/202 shouldn't be ignored 17:13:50 ryansb: we can talk about that, and of course work our way there 17:13:56 +1 17:13:57 including modules, things blow up a bit 17:14:07 sure, not saying that we should take it out *now* 17:14:14 just that one day I'd like it enforced 17:14:15 sivel: If we have to start there and work our way to fixing more things, I'd be for it. 17:14:19 sorry for derailing 17:14:21 3362 violations with modules 17:14:33 but some of that is due to several modules that use 2 space indenation throughout 17:14:40 I'm (personally) happy to enforce stricter standards for new modules 17:14:47 and a number of things that exceed 160 characters 17:14:56 but I figure we may start with this 30 ignores, and then get better 17:15:09 I suppose I could also turn this into a proposal 17:15:49 sivel: In fixing current code, the big thing you're going to run into is people who want to keep git blame attribution 17:15:58 ughhhh modules styling 17:16:04 I experimented with having one set of PEP8 guidelines for existing code, and another for new code, but it's difficult to automate that. 17:16:17 i find those constraints ridiculous, but i wont oppose adding them to enforcement for new modules, still against restyling all existing code 17:16:21 In standardizing for new code/modules, we could probably take a few of those things off the ignore list without difficulty. 17:16:28 abadger1999: I don't doubt that, and I am generally in favor of keeping attribution, but at some point we have to get better 17:16:38 mattclay: Is that easier now that ansible-test knows what files are new? 17:16:58 via the gitdiff functions you've written 17:17:06 there is going to be push back on all corners of this "proposal" 17:17:07 gundalow: Only if we determine new/old for an entire file only. 17:17:08 sivel: I'm +1 to your POV.... I've just never been successful in arguing that to others. 17:17:26 busy modules will get their attribution back 17:18:10 If we want to enforce PEP8, it would be easier to set the bar low enough that we could fix a small number of existing errors to have everything pass. Then incrementally enforce more rules (and fix the necessary violations to have tests pass). 17:18:29 We may also want/need a different set of rules for modules and non-modules. 17:18:30 if we continue ignoring the "problem", it's going to get even worse, and worse quickly, especially with what bcoca calls "wild west modules" 17:18:39 +10000000000000000000000000000000000000000000000000000000000 17:18:46 (to sivel's last comment) 17:18:49 ^ the number of modules we'll have one day 17:18:57 :P 17:19:04 mattclay: I've been experimenting with that, and thus far it hasn't made sense with my ignores 17:19:19 modules are just hugely inconsistent at the moment 17:19:33 sivel: Are you referring to having a different set of rules for modules/non-modules? 17:19:37 mattclay: yes 17:19:37 mattclay: I should clarify, i was only talking about enforcing a higher bar for whole new modules (files) 17:20:20 I've played around with inverting the --ignore and turning into --select, and looking at the counts and such 17:20:37 I feel that this really is achievable, and we may just have to do some crazy --excludes on some modules 17:20:40 Ruleset1: Existing Modules 17:20:40 Ruleset2: New Modules 17:20:41 for the time being 17:20:41 Ruleset3: Everything apart from modules 17:21:03 Is that what we are thinking, or would #3 actually be in two parts (existing and new) 17:21:09 by new I mean whole new files 17:21:31 I am more for saying 2 rules 17:21:35 If I'm understanding sivel correctly, it seems we might only have 1) old code and 2) new code 17:21:37 existing and net new files 17:21:38 we could change new modules to new plugins 17:22:00 mattclay: that is largely what I am proposing 17:22:52 black/whitelist the non-complient files (like we've done with Python, tests, etc) till they improve over time - and maybe have a script which we run ever so often that tells us if a file is now compliant with the stricter set of rules? 17:23:18 again, 3300 changes to meet the rulesets is big, but we could limit that a little, like excluding the 4 space indentation on the modules that currently do 2 17:23:18 That seems like a simple enough approach. We can generate a list of "old" files to use for the relaxed ruleset. Anything not on that list gets the more strict ruleset. As old files are cleaned up, we can take them off the "old" list. 17:24:06 gundalow: +1 to having a script to automatically check for candidates for removal from the "old" list 17:24:08 I don't have a proposal for new, but I imagine it would be much closer to strict pep8, with 160 column and ignoring E402 17:24:25 I suggest that was as it closes the flood gates, and lates us take our time with cleaning up existing code 17:24:51 s/lates/lets/ 17:24:59 sivel: I'd reindent asap then we can get rid of that problem. 17:25:11 * abadger1999 looks for an existing script to do that. 17:25:12 abadger1999: I agree with that, just trying to provide stats and options 17:25:19 Probably the most difficult part to agree on is what the more strict ruleset should be. The relaxed ruleset will be largely determined by our existing style (minus whatever we're willing to fix on day one). 17:25:20 abadger1999: there is an autopep8 script 17:25:44 mattclay: we can find the easy wins on doing that 17:26:01 I played with changing --ignore to --select, and counting the number of times an error ocurrs 17:26:20 a large number are relatively small 17:26:38 so I think initially, ticking off the easy wins would be simple 17:26:44 eventually we get to a more complex smaller set 17:27:34 Thew only two things I'd change for strict are (line-length=160 and "E402 module level import not at top of file" (becausev pep8 doesn't understand our DOC vars and since those are only used externally to the file, it doesn't make sense to put the imports above them) 17:28:05 err... change from the default pep8 17:28:12 abadger1999: ++ that agrees with my earlier comment about what I see 17:28:31 (as the idal)... how we get there is what I think sivel is addressing above. 17:28:42 What are everyones thoughts here? Do you think we need a proposal? Are those here comfortable with making a decision now? 17:29:19 i think we've spent enough time talking about pep8 over the years that i'd like to just get it over with, do it, enforce it, etc 17:29:26 yup 17:29:45 bcoca said he'd be okay with new code/files so I'm okay making a decision on that now. Others, we probably need a vote among committers. 17:29:49 I mean, I can submit an "approved" proposal, so that we have it documented 17:30:00 abadger1999: aka if coca's happy we are all good :) 17:30:09 bdfl 17:30:09 im probably only one against full enforcement 17:30:13 and have a place we use to document the process 17:30:26 bcoca: we still aren't going full, and may never, or at least not soon 17:30:27 sivel: that will probs be in the new docs 17:30:43 gundalow: yeah, we will need to document in the new docs 17:31:05 over the years, bcoca has been the anti-pep8 faction, so for new files, if he's fine, I don't think there's a problem going ahead with it :-) 17:31:23 * gundalow is planning on starting with new module-checklist as that's got a good cost vs benefit 17:31:41 ok, anyone against? Speak now or forever hold your peace 17:32:00 * sivel is making decisions ;) 17:32:01 #agreed to enforce (though not fully) pep8 for new files 17:32:01 By others I mean, incrementally tighetening down on pep8 for existing code. 17:32:11 Yay! 17:32:34 i expect dag to complain ... but i expect taht anyways 17:32:38 #info bcoca abadger1999 gundalow mattclay sivel jtanner all agreed to enforce (though not fully) pep8 for new files 17:32:44 cool, how would you like to see this start? We don't necessarily have a place for "directives" 17:32:46 shipit 17:33:05 like I said I could write an approved proposal, to take the palce of this new directive 17:33:17 write it up developer docs 17:33:20 yup, proposal, lets do this write 17:33:21 or we could add it to the roadmap 17:33:44 #action gundalow to add document this in new developing_modules 17:33:49 cool, over the next few days, I'll work on a proposal 17:34:03 I may be able to get it done by tonight, but no promises 17:34:05 So, code free is going to be 15th Feb (and modules 2 weeks after) 17:34:13 (from memory) 17:34:14 *freeze 17:34:21 lol, yes 17:34:30 CODE FREE! 17:34:42 free as in puppies 17:34:45 I can add pep8 checks (along with the old/new list) to ansible-test. We'd just have to add the pep8 exclusions then for old and new code. 17:34:46 that is for the 2.3 release? 17:35:10 So I think it wouldbe good to enforce the bar for all modules that go into 2.4 17:35:11 so I'll document that this should start for the 2.4 17:35:17 +1 17:35:46 When do we create stable-2.3, on 15th Feb, or +2/+4 weeks? 17:36:04 At the time of the alpha/beta/rc usually 17:37:37 also, I'm going to include in the proposal a change to validate-modules to check for imports above docs, since we seem to have had some headbutting about that recently, and we don't have it documented 17:37:55 sivel: +1 that would be great 17:38:02 bingo 17:38:03 love you all 17:38:13 haha 17:38:17 I'm planning on reviewing docs against validate-modules 17:38:32 ok, next I suppose? 17:39:05 #action sivel to update validate-modules to check for imports above docs 17:39:21 #action gundalow to review module-checklist against validate-modules to ensure it's all documented 17:39:59 #action gundalow to add coding style guidelines & updated example module into docs 17:40:47 #info All new modules in 2.4 must pass the higher bar 17:40:59 did we agree what the higher bar for new modules is? 17:41:13 E402 module level import not at top of file 17:41:14 abadger1999: and I said --ignore=E402 and 160 columns 17:41:23 Thanks 17:41:52 and just to clarify, one ruleset to cover all new files (modules or utils?) 17:41:53 New modules, or new files? 17:41:59 new files 17:41:59 * gundalow hifives mattclay 17:42:44 Cool. 17:42:45 what about: [missing-docstring] Missing class docstring 17:43:01 I don't think pep8 checks for that by default 17:43:09 oh, maybe that's not from pep8. I'm using vim + syntastuic 17:43:14 cool 17:43:23 there is a pep8 plugin that does it iirc 17:43:39 I mean, over time we should still work to get better, and may include some of those additions 17:43:40 pylint finds missing doicstrings, I don't think pep8 does 17:43:56 I am a -1 on pylint fwiw 17:44:07 pyflakes (flake8) perhaps in the future 17:44:07 #agreed All (modules or utils) files to pass --ignore=E402 --max-line-length=160 17:44:24 I've got pep8, pyflakes and other things all being run in vim 17:44:32 Excellent, thanks everyeon 17:44:37 thank you! 17:44:39 jesus, I really can't type today 17:44:41 Are we limiting it to modules and utils? Or including core files too? 17:44:49 ansible/* 17:44:52 is what I thought 17:45:04 --exclude=test/*,examples/*,hacking/*,docs/* 17:45:12 so effectively ansible/* 17:45:22 #agreed All (--exclude=test/*,examples/*,hacking/*,docs/* ) files to pass --ignore=E402 --max-line-length=160 17:45:50 pylint is great but it's hard to automate.... 17:45:53 Again, I'll get this all together in the "proposal" as well 17:45:55 We want tests to be readable too. Any reason to exclude those? 17:46:04 sivel: Ace, thanks 17:46:12 #action sivel to write this up in a proposal 17:46:17 mattclay: I would be +1, but it's a lot of additional 17:46:27 One step at a time :( 17:46:27 mattclay: if you are +1, we can do it, or postpone it for later 17:46:57 I'd prefer *.py unless there's a good reason to exclude something. 17:47:15 #chair mattclay sivel abadger1999 17:47:15 Current chairs: abadger1999 gundalow mattclay sivel 17:47:16 mattclay: I'll mention it, I feel comfortable with small shifts as we go 17:47:34 right, I need to eat 17:47:40 and I think attribution of tests is less important 17:47:52 so blasting through it would be okay with me 17:48:06 If between you you can please #action #agree and #endmeeting that would be great 17:48:11 I'll read the scrollback later 17:48:13 yep 17:48:15 Thanks again :) 17:48:18 I think we can do that now 17:48:30 mattclay: are you +1 on including test/* now? 17:48:35 sivel: Yes 17:49:36 mattclay: do you want to use our guidelines for new files as the guidelines for test/*? Or stick with the 30 ignores for now? 17:51:37 sivel: I don't think tests need special treatment. New and old test files can be treated just like any other new/old files. 17:51:50 mattclay: ok, sounds good 17:52:13 #agree we will extend our pep8 guidelines to test/* 17:52:15 That keeps the implementation simple and easy to explain. Old files use relaxed rules, new files used more strict rules. 17:52:27 Ok, anything else? 17:52:49 That's it from me. 17:52:51 if not we can end the meeting 17:53:54 #endmeeting