15:01:20 #startmeeting Ansible Core Meeting 15:01:20 Meeting started Thu Mar 30 15:01:20 2017 UTC. The chair is gundalow. Information about MeetBot at http://wiki.debian.org/MeetBot. 15:01:20 Useful Commands: #action #agreed #halp #info #idea #link #topic. 15:01:20 The meeting name has been set to 'ansible_core_meeting' 15:01:40 Óla 15:01:44 #chair abadger1999 alikins bcoca jimi|ansible jtanner mattclay nitzmahone Qalthos ryansb shertel funzo 15:01:44 Current chairs: Qalthos abadger1999 alikins bcoca funzo gundalow jimi|ansible jtanner mattclay nitzmahone ryansb shertel 15:01:57 blorp 15:02:01 Yo 15:02:03 o/ 15:02:10 At dentist 15:02:12 #info #info Agenda https://github.com/ansible/community/issues/156 15:02:18 jtanner: oww, you get all the fun 15:02:21 * mattclay waves 15:02:46 funzo: You need to get your freenode nick registered then ask jimi|ansible to give you @ 15:03:54 bcoca: while I look through the agenda could you add an item for plugin docs, which we were talking about in #ansible-devel thanks 15:04:15 #topic Versioned Docs 15:04:27 #info https://github.com/ansible/community/issues/150#issuecomment-277058347 15:04:43 #info Proposal AGREED, with docs team to work out the detail 15:05:32 funzo: \o/ 15:05:48 Hey all 15:05:58 tanner isn't here, so no point talking about proposal for issues 15:06:21 np 15:06:35 #topic ansible#16832 Ansible pre-releases are not published on testpypi.python.org 15:06:41 #info https://github.com/ansible/ansible/issues/16832 15:06:52 abadger1999: You do packaging stuff, right? 15:07:37 rpm packaging and I know about python packaging.... I think this is more of a release manager question though. 15:07:42 * abadger1999 punts to jimi|ansible 15:07:48 ack 15:08:23 I didn't think that testpypi was for prereleases though. 15:08:32 I thought it was for testing your uploads to pypi. 15:08:54 we should have a way to allow RCs via pypi, not sure what that looks like 15:09:05 ^ im +1 for whatever gets us there in sane manner 15:09:08 abadger1999: That's my understanding as well 15:09:23 this is something we've kicked around a lot, it was basically on gmainwaring's/QA's plate to modify the jenkins release jobs to alternately push to pypi testing 15:09:39 though the debate there was also that we didn't need to do testpypi as abadger1999 said above 15:09:40 We just have to use a prerelease tag (rcX) 15:10:04 i just have a fear of accidentally releasing an rc as a final because of some tag naming mistake 15:10:19 #info Not sure if testpypi is for prereleases *or* testing how to upload to pypi 15:10:52 I've thought about hacking up the release playbook or something to do that with repeated prompts... 15:10:53 we can probably do both, release with rc tag, but use testpypi before pushing to pypi 15:11:01 ^ to confirm everything is kosher 15:11:16 #info There is a legitimate concern that RCs may end up on live pipy if they get named/tagged incorrectly 15:11:38 Yeah, testpypi is more about "does this package work?" Because you can't reupload the same version. 15:12:27 nitzmahone: Is that confirmed? 15:12:27 bcoca: yeah, I think that's the flow that python upstream encourages. 15:12:53 gundalow: is what confirmed? 15:12:56 so lets do testpypi first (to confirm packages look ok) 15:13:01 then we can add RC tagging 15:13:10 ^ which with testpypi, we should have minimized risk 15:13:31 nitzmahone: nm, I miss read 15:13:37 +1 to make it tower job with workflows so 2nd person can revise and approve push to pypi from testpypi 15:13:47 * bcoca ducks 15:13:59 :D 15:15:31 now we just need someone with time to do it .... 15:15:40 * bcoca not it 15:16:14 Could someone that understand this a bit better than I, please add a few comments on ansible#16832? 15:16:51 probably should close as that is not intended use, with nice blurb on we are looking into RC tagging 15:17:30 bcoca: well vounteered 15:17:36 :P 15:17:57 #info ansible#16832 needs closing: as that is not intended use, with nice blurb on we are looking into RC tagging 15:18:02 Shall we move onto the next item? 15:18:18 FWIW: I've never had any issues with pypi rc tagging for pywinrm. 15:18:34 #action abadger1999 to summarize discussion for 16832 15:18:43 Thanks 15:18:58 #topic Docs for plugin types 15:19:06 Do we want the ticket closed as well? 15:19:10 #info Now that we support docs for many more plugin types, should we require all new plugins of those types to have docs included? 15:19:12 Yes, have some. 15:19:21 abadger1999: yup (accoring to bcoca) 15:19:25 k 15:19:27 nitzmahone: +1 15:20:00 1) Would be nice to enforce this for any new plugins that get created 15:20:07 2) How many plugins need documenting 15:20:51 3) Do we currently have the ability to use this info to generate HTML that ends up on docs.ansible.com - I think I've see some signs of auto generated stuff before 15:21:26 ansible-doc -t -l will show list of UNDOCUMENTED 15:21:53 https://gist.github.com/bcoca/038038fd8647b07fed75821ed741058c 15:22:01 ansible-doc -t connection -l ^ 15:22:36 oh, that's cool 15:23:12 works for all supported types 15:23:18 gundalow: i thought you would like ;-) 15:23:31 [WARNING]: accelerate parsing did not produce documentation. <= you also get these 15:23:55 bcoca: I do, you know I love good documentation 15:23:56 accelerate should be removed pretty soon anyway, if not already? 15:24:03 jimi|ansible: agreed 15:24:15 #info accelerate should be removed pretty soon anyway, if not already? 15:24:16 jimi|ansible: just first example due to ... alphabet 15:24:47 https://gist.github.com/bcoca/f2fc5d87c7aeb38bfde9223427f5ddd5 <= more in lookups 15:25:30 So with CI it would be good to stop this list from growing, given it's ansible-doc that should be fairly easy to add 15:25:38 Hrm, I thought that got pulled early in 2.3 too... 15:27:00 The easiest approach would be to add at least minimal docs for each. Then CI could require they all have docs. Otherwise we need a list of exceptions. 15:27:22 mattclay: That's a good idea 15:27:56 (But harder to figure out what work needs to be done) 15:28:21 point 15:28:50 just require on new plugins for now, we need effort to document existing (sans those we are going to deltee) 15:30:32 Yeah, I'd tend to agree with abadger1999- easier to list undocumented than "underdocumented". 15:31:23 cache: 2 15:31:26 connection: 15 15:31:29 callback: 23 15:31:32 lookup: 34 15:31:34 Need docs 15:31:47 ugh, I suck at morning meetings 15:31:52 Just as with modules/actions, there may also be internal that we want to whitelist. 15:31:54 sivel: mornin 15:32:17 hum,only ~6 have docs 15:33:07 I have docs for winrm CP already, just have to convert from spreadsheet to yaml... 15:34:54 grep -vf whitelist <(for TYPE in 'module' 'cache' 'connection' 'callback' 'lookup' 'strategy' ; do ansible-doc -t "${TYPE}" -l 2>1 | grep UNDOCUMENTED | cut -f 1 -d ' ' ; done) 15:35:00 or something else dirty should do the trick 15:35:30 + check to see if a plugin in whitelist is now documented 15:36:41 hum, I don't see anything else open on the agneda 15:36:46 #topic Open Floor 15:37:09 oh 15:37:16 #topic set_extra_var module to set extra variable from play #20849 15:37:22 #info https://github.com/ansible/ansible/pull/20849 15:37:26 (this may be a quick one) 15:38:53 well, apart from having to read it all 15:40:09 There have been limited circumstances in the past where this would've been really useful. Not a big fan of the name. 15:40:43 It's consistent, but feels ... wrong. 15:40:52 -1 15:41:21 extra vars are a 'manual override', just set a vars in play in 'vars:' secion to get almost same precedence 15:41:33 how is that different than set_fact + 'when: some_var is not defined' ? 15:41:47 agaffney: slightly higher precedence 15:41:50 agaffney not in host context 15:42:17 Same value squashes all host values 15:42:37 nitzmahone: that is how they all end up in 'host context' 15:42:45 (including hosts not referenced by current play) 15:42:56 the higher precedence doesn't matter if the whole point is to not override an --extra-var anyway, and keeping it out of the host context seems like a flimsy reason for a new feature 15:43:21 ^ yep 15:43:42 I am a -1 on setting extra vars. What I would like to see instead is `set_global` or allowing set_fact to set a global var 15:43:46 in any case, all vars end up in host context ... so keeping it out is pretty useless 15:44:23 sivel: what does 'global' mean in this context? for all hosts in play? for all plays? 15:44:26 effectively set a play level var 15:44:29 But this would apply to future dynamic hosts, which setting in host context would not. 15:44:34 like one in `vars` 15:44:35 use vars: 15:44:39 I like the distinction sivel makes 15:44:50 include_vars can do this already 15:45:02 set_vars? 15:45:12 kinda, but it is still linked to a host, there have been many asks to set a var that is not host scoped 15:45:18 Gawd help you with strategy: free 15:45:28 ^ ouch 15:45:48 use vars: keyword, if you need it for rest of tasks in play, use block 15:46:04 to me set_extra_vars feels like a hack to set a non-host scoped "global" var 15:46:16 sivel: agreed 15:46:17 this can already be achieved, making it a task is problematic (look at meta/static includes for examples of 'global tasks' being a problem) 15:46:26 +1 to sivel's suggestoin... don't think we should override extra_vars here. 15:46:40 so seems we all agree on -1 to PR 15:46:43 but setting to a "global context" makes sense 15:46:51 possibly diff implementation would be accepted 15:47:01 So a mythical "global" would still be lower precedence than extra-vars, yeah? 15:47:04 abadger1999: problem is, we dont have global context outside of extra_vars 15:47:21 bcoca: I'd rather create a new one than override extra_vars. 15:47:30 Same 15:47:40 nitzmahone: yeah, lower precedence 15:47:45 abadger1999: agreed, but i would also like not to crate more (precedence list is already ... long ...) 15:47:48 I think there's value in having since invariant global stuff 15:47:51 And, we can just call them "mythical vars" :) 15:47:58 *some 15:48:34 block + vars achieves same w/o introducing even more complexity to var mangement (i know its not as clean as some woudl want) 15:48:57 nor does it live across plays (extra vars and host vars do this) 15:49:27 but i think we are digressing, lets vote on PR 15:49:33 -1 15:49:33 -1 ^ for all of teh above 15:50:02 Yep, -1 to current impl 15:51:12 -1 15:51:54 sounds like a nop 15:52:20 #agreed #20849 NOP (-1 from sivel bcoca abadger1999) 15:53:10 and me (failed with "yep" prefix) 15:53:10 Could someone put a summary on the ticket and close it please? 15:53:28 #agreed #20849 NOP (-1 from sivel bcoca abadger1999 nitzmahone) 15:53:42 nitzmahone: appologies, I only looked at the first two chars :P 15:53:57 Did we agree on a better way forward? 15:55:04 maybe, just dont think its priority, there are many ways around it, even if they are not 'optimal' 15:55:12 at leats we agree on closing PR 15:55:23 ack 15:55:41 #info There may be a better way to do this, though don't believe it's a priority 15:55:46 #topic Open Floor 15:55:59 Are we still on track for RC3 today? 15:56:14 jimi|ansible: ^ 15:56:41 I haven't any major bugs.. but I do have things I'd like to fix for rc4. 15:57:22 ditto 15:57:34 #topic Error reporting 15:58:37 So one thing I've been thinking recently when documenting the new Persistent Connection framework that's used for Networking is it would be good to have a way to map from error messages to docs.ansible.com 15:59:11 Such as error numbers, or a place to look up error messages (which may just be Google + "error message") 15:59:14 thoughts? 16:00:01 would required a) numbering errors, b) documenting them and solutions, c) fixed point in website to look these up (consider we area also now doing version split on docs) 16:00:03 So you could go to docs.ansible.com/ansible/errorlookup?q=error id 16:00:41 nod 16:00:42 I prefer that error message is actually helpful and gives enough information to have user fix it 16:01:06 if errors raised a sufficiently unique Exception, that would be a good first step. Then at least the failure has a name. 16:01:19 helpful error messages? what kind of software developer are you? 16:01:40 gundalow: What kind of documentation would you want to present in docs that couldn't be included in the error message? 16:02:31 alikins: i consider exceptions as bad way to communicate to users, only useful for developers 16:02:31 https://github.com/gundalow/ansible/blob/network-debug-docs/docs/docsite/rst/network_debug_troubleshooting.rst#troubleshooting-network-modules 16:02:51 alikins: its about the message, name matters little 16:03:03 hum for example 16:03:30 the items sections starting "Error" 16:04:12 "invalid connection specified, expected connection=local, got ssh" is a good error message, it tells you the solution (though you many need to look where to set it, it gives you enough info to look at example playbooks) 16:04:13 exceptions that are only meaningful to humans via the message is a good way to prevent automation 16:04:45 i.e ""Unable to open shell"" <= 1/2 useful message, "Unable to open shell, try running with ANSIBLE_LOG_PATH=/tmp/ansible.log and/or -vvv to get more information" <= helpful message 16:04:58 bcoca: nod, I was thinking similar 16:05:27 well "Unable to enter configuration mode" + do you need authorize: yes? 16:05:30 shoving that helpful tip into every exception that's raised seems...wrong 16:05:52 unless it's done at a higher level to prevent code duplication 16:05:52 though i would change /tmp/ansible.log to ~/ansible.log .. jic private info is leaked 16:06:09 For the cases in https://github.com/gundalow/ansible/blob/network-debug-docs/docs/docsite/rst/network_debug_troubleshooting.rst#troubleshooting-network-modules these aren't exceptions, they are via display.displa 16:06:16 bcoca: ah, good spot, thanks 16:06:22 agaffney: it is already for bare exceptions 16:07:02 project has had long stanging rule: if user sees an exception, its a bug, they should ALWAYS get an error message that we write 16:07:09 bcoca: by bare exceptions, are you talking about the "unexpected exception....run with -vvv to get full traceback" message? 16:07:10 +1 16:07:18 ^ IF they need traceback info, they normally have available via -vvv 16:07:25 agaffney: yep 16:07:33 agaffney: or even if that is not captured 16:07:42 'unexpected exception' == bug 16:09:42 nod 16:09:52 Cool, thanks for the suggestions I'll look at updating the messages 16:10:35 oh, and if anyone has anytime for review of https://github.com/ansible/ansible/pull/22652/files that would be great 16:12:42 #topic Open Floor 16:12:51 Anything else? 16:13:25 fine grained exceptions that include relevant context (in the msg or the repr and as data attributes) is an easy way to improve app stability. Also helps remove lots of tedious (and error prone) error handling code 16:15:39 alikins: while I don't disagree, I also hate the resultant thousands of typed exceptions that one needs to dig through when trying to decide what to raise. 16:15:45 fine grained messaging does, not as sure fine grained exception objects do 16:15:56 (having been on projects that have gone both ways) 16:16:14 It takes a lot of discipline to manage the typed exceptions properly. 16:16:17 alikins: also consider object creation si not free and this is not long runnign deamon, 300 exception objects will end up creating a real burden 16:17:03 if ansible were a service, it might make more sense, but its a cli app for users, which might be techincall but are not required to be programmers 16:17:14 In general, I don't think we've demonstrated such discipline. ;) 16:17:21 :) 16:17:51 nitzmahone: discwhat? 16:17:59 nitzmahone: I would say picking the right exception is easy if you know where you want the error handled. 16:18:37 bcoca: prescriptive exception text is also a two-edged sword- witness the "permissions error, did you have permissions to /tmp" red herring under Windows. :) 16:19:18 alikins: true, assuming we've not created overlapping exception types 16:19:18 nitzmahone: if there were perfect error system we'ld all be using it ... 16:19:27 nitzmahone: but i think this path has less issues 16:19:32 Typed exceptions or error codes are more useful when providing an API. If the output is just going to end up in a log or on the console, it's probably overkill. 16:19:45 ^ when your user IS a programmer 16:20:21 bcoca: For a project of this size and ilk, I tend to agree. If API usage were more a focus, I'd probably change my mind. 16:20:25 End users want helpful error messages, developers want exceptions/error codes. 16:20:37 Well, developers like helpful error messages too. :) 16:21:10 *But shouldn't be making flow of control decisions based on them. 16:21:59 A deep and wide exception hierarchy isn't generally useful for us at the moment because we aren't handling errors we throw in specific ways. 16:22:09 Our errors generally hit some sort of catchall. 16:22:59 error in a callback pugin... Okay, spit a warning and ignore it. error that gets to the toplevel. give the -vvv text and exit. and so forth. 16:23:20 nitzmahone: if we had 2 projects, i'dl be fine for it in api, still would seem overkill on cli side 16:23:49 mattclay: And if you dont use useful exceptions, then log or console is your only choice. 16:23:53 abadger1999: specific errors are handled in some places, they tend to be non-fatal 16:24:24 mattclay, alikins, that is why we now log tracebacks by default, only really 'show' them on -vvv 16:24:56 tangent: pop 16:26:32 Are we done? 16:26:37 * gundalow puts on his chair hat 16:26:38 I think so 16:26:49 5 16:26:49 4 16:26:49 3 16:26:52 #endmeeting