17:00:19 #startmeeting Ansible Testing Working Group 17:00:19 Meeting started Thu Feb 15 17:00:19 2018 UTC. The chair is gundalow. Information about MeetBot at http://wiki.debian.org/MeetBot. 17:00:19 Useful Commands: #action #agreed #halp #info #idea #link #topic. 17:00:19 The meeting name has been set to 'ansible_testing_working_group' 17:00:20 sivel: sivel 'Matt Martz' 17:00:29 #chair evrardjp sivel mattclay 17:00:29 Current chairs: evrardjp gundalow mattclay sivel 17:00:33 * mikedlr wave 17:00:37 #chair mikedlr 17:00:37 Current chairs: evrardjp gundalow mattclay mikedlr sivel 17:01:00 * Pilou wave 17:01:08 * mattclay waves 17:02:20 So, given 17:02:37 * We are nearly at the end of 2.5 17:02:43 * Ansible 2.6 will be a stability release 17:02:59 * We have lots of great people that are interested in testing, and around today 17:03:10 I though we could crowd source some ideas 17:03:24 around 17:03:26 What a stability release means: https://github.com/ansible/community/issues/296#issuecomment-364482870 17:03:38 1) Fix existing issues identified by existing tests (listed in skip/ignore files) 17:03:43 Olá 17:03:53 2) Add more test - aka improve coverage & happyness 17:03:58 3) Improve test Stability 17:04:03 #chair abadger1999 17:04:03 Current chairs: abadger1999 evrardjp gundalow mattclay mikedlr sivel 17:05:32 To that end we've got https://github.com/ansible/community/wiki/Testing:-progress-tracker that track those three sections 17:06:36 So what I thought we could do is go through, section by section and add other things in to that. then if there is any rough priority within the three sections highlight that 17:06:41 #chair Pilou 17:06:41 Current chairs: Pilou abadger1999 evrardjp gundalow mattclay mikedlr sivel 17:06:47 How does that sound? 17:06:58 Also should I move it into an etherpad so we can group hack it? 17:08:38 Works for me. 17:09:13 I'm for that, though what I wanted to discuss is getting requirements for tests codified a bit; it's probably a separate documentation issue / PR towards the main development documents. 17:09:21 https://public.etherpad-mozilla.org/p/gundalow-scratch-pad 17:09:41 ALL ^ Please hack on ^, ignore formatting. I'll sort that out later 17:09:47 mikedlr: hum, good point 17:10:18 #info 1) Fix existing issues identified by existing tests (listed in skip/ignore files) 17:10:25 #info 2) Add more test - aka improve coverage & happyness 17:10:32 #info 3) Improve test Stability 17:10:56 mikedlr: I think we can discuss that under (2), as we need to guide people how to write good test, that make sense? 17:11:18 #topic 1) Fix existing issues identified by existing tests 17:11:31 thanks for the change of color. 17:11:46 haha, yup, mattclay just pointed that out 17:11:51 yes; though it's more about an explicit requirement to new module contributors and especially reviewers that there _must_ be at least one full module test. 17:11:57 it's going to look like unicorn vomit otherwis 17:11:58 e 17:12:52 I think it's better to ask functional testing before new module inclusion indeed. 17:13:08 Hi 17:13:13 explicit requirement is fine 17:13:21 mikedlr: OK, You want to add your throuughts into the new section around line 130. then we have something to discuss when we gt there 17:13:26 #chair shaps 17:13:26 Current chairs: Pilou abadger1999 evrardjp gundalow mattclay mikedlr shaps sivel 17:14:24 OK, so the rest of us can start with Fix issues identified by existing tests 17:14:56 Q: We we have any know issues that are not reacked by `test/sanity/*ignore.txt`? 17:15:03 not tracked by* 17:17:11 sivel: wondering if for fixing validating-modules we should break it down by Error# 17:17:16 or if that's over kill 17:17:32 I think fixing per file is likely easiest 17:17:49 file/dir yup 17:18:13 Added 17:19:11 when we push this next change there will be 1369 modules listed in ignore.txt for validate-modules 17:19:47 ack 17:20:21 Pilou abadger1999 evrardjp gundalow mattclay mikedlr shaps sivel Feel free to shout out ideas here, or just add stuff directly into https://public.etherpad-mozilla.org/p/gundalow-scratch-pad Don't worry about formattin 17:20:50 aim for (1) Fix existing issues identified by existing tests is to give people enough info so they can fix the issues already identified 17:20:54 ack. 17:21:05 Do we have any Windows people here? 17:21:14 next is: Sanity: Window's pslint 17:26:14 hum, not sure if there is much else to way on "Fix existing issues" 17:26:15 apart from 17:26:27 Pilou: Amazing work clearing out all the borken imports :) 17:27:48 OK, lets move on to section 2 17:28:03 #topic 2) Add more test - aka improve coverage & happyness 17:29:11 This doesn't need to apply to just modules either. We need test coverage everywhere 17:29:19 oh, yes 17:29:21 hum, 17:29:51 gundalow: Ansibot will be able to import module and read metadata (DOCUMENTATION) directly :) 17:29:52 2.1) Test modules 17:30:24 Pilou: Yup, saw a WIP PR about that for deprecation. What are you thinking of here 17:30:37 sivel: mattclay wonder if (2) should be broken down to 17:30:42 2.1) Test modules 17:30:47 sivel: +1 17:30:48 2.2) Test module_utils 17:30:55 2.3) ... 17:31:14 I think they they are separate topics and skill sets 17:31:35 We also track some other import issues not identified by the import tests in validate-modules. Some modules try to use imports before AnsibleModule is instantiated, and raise exceptions instead of failing with module.fail_json 17:32:04 sivel: Do we have a test for that? You want to add a section in (1) for that? 17:32:08 oh do you remember some like that sivel ? 17:32:38 maybe listing them would be a good idea, track patterns, improve them to the latest standards. 17:32:41 sivel: Do you have an example of one of those? 17:32:43 gundalow: indeed, just didn't want anyone to think we weren't concerned with core 17:32:58 gundalow: Yeah, splitting up tests for modules and module_utils makes sense. 17:32:59 evrardjp / mattclay: E321 Exception attempting to import module for argument_spec introspection 17:33:06 There are a number listed in ignore.txt 17:33:32 13 modules fail with that 17:33:43 grep E321 test/sanity/validate-modules/ignore.txt 17:33:57 worth nothing on the etherpad, whatever the appropriate section is. 17:34:38 we have a validate-modules section, is it worth calling that specific one out directly? 17:35:04 sivel: my 2 cents, the core should be the most tested part -- As a user, it's something that's most painful to live with when we have change of behavior because it wasn't tested. 17:35:32 evrardjp: I don't think anyone will object to that. if they do, send them my way :( 17:36:19 gundalow: do we have separate coverage for integration and unit tests available? I think that much core code / util code should be exercised in integration tests but should only have it's own unit tests? 17:36:27 sivel: How do you mean "calling that specific one out"? Feel free to create a new section if it's more of an involved fix for E321 17:36:36 sivel: Ah, imports that are part of main, what would explain why the import sanity test doesn't catch those. 17:36:56 mattclay: correct, not just straight import error, requires calling main() to expose 17:37:16 mikedlr: Yes, using the coverage webpage you can filter to show coverage for only unit or integration. Though only at the file leel 17:37:18 sivel: I should extend the import test to handle those, since doing it correctly requires an empty venv, which the module validator doesn't have. 17:38:16 mattclay: yeah, it's kind of ancillary that validate-modules tracks it. Just done to provide a reason why argument_spec wasn't inspected 17:38:57 sivel: OK, I've got that on my list to implement as part of the import test. 17:38:57 there are actually modules that would fail in validate-modules, except it has some extra deps that satisfy the import errors 17:39:08 some azure modules specifically 17:40:00 I have a validate-modules venv, with only core ansible and validate-modules requirements that reports them, that CI doesn't 17:47:44 Anyone got ideas on how to increase module coverage? 17:48:32 increase or track? 17:48:47 either I guess 17:49:16 Doesn't feel like we've got a defined list of things for people to get stuck into 17:50:28 I think anyone who goes looking can find themselves spending years just trying to increase coverage, or fix known ignores 17:51:02 Do we need to giuide/set priority? 17:51:18 coverage can also be misleading. It's a number to help guide you, but to get real coverage you need to be more diligent 17:51:26 oh, sure 17:51:54 I could blow the whole 2.6 release on probably a handful of modules 17:52:47 personally I'd try for both 100% unit test coverage, and integration tests to supplement 17:52:53 the main thing that prevents me from doing much work on module tests is that I always exclude module tests when running 'ansible-test units' 17:53:16 and that is mostly just impatience / slow tests 17:53:20 And for upported: core modules maybe we do need to really inrease both 17:53:56 alikins: well for local runs you can do ansible-test units test/units/what/i/want/to/test and leave the rest to shippable 17:54:20 A lot of our slow unit tests are very badly written. Many are really integration tests written in python instead of a playbook. 17:55:33 nod 17:55:46 I haven't really looked into why something like test/units/modules/network/f5/test_bigip_sys_global.py takes ~30s on a local test 17:56:34 I guess import big IP takes big time 17:56:53 takes 1.06 seconds if you don't have f5-sdk installed 17:57:26 and no idea how large that fixture is, to load via json 17:57:54 oh yeah 17:58:20 1kb shouldn't take long 17:58:53 seems we are coming up on our hour 18:00:27 I guess not that test module specifically, but like test/units/modules/network/f5 ("25.03s call test/units/modules/network/f5/test_bigip_provision.py::TestManager::test_provision_one_module_default_level") 18:01:04 #chair 18:01:04 Current chairs: Pilou abadger1999 evrardjp gundalow mattclay mikedlr shaps sivel 18:01:15 OK, how would people like to continue with this? 18:01:50 Work on some specific areas/ideas/ and keep on updating the etherpad and we can review next week? 18:02:39 Maybe move back to the wiki now? The etherpad works better for short-term edits. I'm not so sure about over a longer period. 18:02:53 Yup agreed 18:03:02 I'll tidy up the formatting and do that 18:03:42 Not sure how well the wiki deals with people editing stuff 18:05:48 gundalow: as you go through see if there are other people (e.g. other working groups) that should maybe comment; there's nothing about writing tests for containers, for example. 18:06:42 somehow we have to take the joy out beyond the testing working group to those that will have to deal with it in real life. 18:07:17 mikedlr: good point. I know you lot in #ansible-aws have been work on this 18:11:04 gundalow: Since we're over our 1 hour, lets save the rest of the agenda items for our next meeting. 18:11:58 mattclay: Sure 18:12:06 Thank you everybody 18:12:36 I'll tidy up the etherpad and put it back on the wiki. If you have any other ideas feel free to ping me & mattclay in #ansible-devel or update the wiki directly 18:12:55 If you don't have wiki permissions and would like them, just let me know 18:13:49 Thanks! 18:13:51 #endmeeting