17:30:34 #startmeeting networking_lib 17:30:35 Meeting started Wed Dec 16 17:30:34 2015 UTC and is due to finish in 60 minutes. The chair is dougwig. Information about MeetBot at http://wiki.debian.org/MeetBot. 17:30:36 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 17:30:38 The meeting name has been set to 'networking_lib' 17:30:50 agenda: 17:30:51 https://wiki.openstack.org/wiki/Network/Lib/Meetings 17:30:56 #topic Welcome 17:31:00 hiya all, who all is around? 17:31:04 o/ 17:31:06 * HenryG needs a minute 17:31:52 * dougwig hands HenryG a minute. 17:32:01 #topic Announcements 17:32:15 coordinating work and trying to get relevant info in this wiki page: 17:32:15 https://wiki.openstack.org/wiki/Network/Lib/Meetings 17:32:46 this next part should be fun with gerrit down... 17:32:51 #topic Finalize callbacks interface 17:33:04 kevinbenton, armax, ping 17:33:13 https://review.openstack.org/#/c/253661/ 17:33:15 so i was thinking about this 17:33:16 dougwig: pong 17:33:24 will neutron-lib have releases? 17:33:33 yes, into pypi. 17:33:42 what i was hoping is that the first patch just takes exactly what we have for callbacks and move it over 17:33:45 dougwig: don't troll us with gerrit links now 17:33:45 neutron will grab it via requirements.txt, via global requirements. 17:33:53 and then we iterate on that 17:34:03 so the changes are easier to understand from what we have now 17:34:24 i'm ok with that, if you're ok maintaining the old interface if it ever hits pypi ? 17:34:57 well if we need to do a pypi release and this isn't resolved yet, we can temporarily break it for the release 17:35:14 when are pypi releases done? who controls when they are done? 17:35:40 HenryG: mestery is the release manager for the stadium, and i expect when we say 'go' and then he has time. 17:35:47 a random number generator between 1 and 100 runs every hour 17:35:52 if it pulls a 50, a release is done 17:35:53 kevinbenton: what do you mean? hide the interface in that case? 17:35:57 dougwig: yeah 17:36:23 dougwig: make it unusable from outside the module with the hidden magic var 17:37:04 that's fine. as long as tests of neutron against neutron-lib master and neutron-lib (latest pypi) are always green, i'm happy. 17:37:10 does anyone object to phasing it in that way? 17:37:20 sounds good to me 17:37:26 dougwig: sounds good 17:37:39 #action someone make a note in gerrit on this when it's up 17:37:55 #topic Do we hate pylint? 17:38:00 this was 90% a joke, but 17:38:06 dougwig: what would be the note? 17:38:07 so i didn't get to see this review yet 17:38:14 it costs a lot to maintain, and i've only ever found *ONE* bug on top of flake8 with it. 17:38:18 I hate 90% of pylint 17:38:31 armax: oh, to merge callbacks as they currently exist 17:38:36 armax: revert paul's patch to a basic move, with a plan to iterate it in place before release. 17:38:37 that the typical effort of bootstrapping neutron-lib is to copy and paste and to iterate in tree? 17:38:40 armax: and then iterate on them so it's easier to understand the change 17:38:58 #undo 17:38:59 Removing item from minutes: 17:39:08 armax: want to chime in on that? 17:40:00 dougwig: that’s fine by me, assumed that we just don’t ‘simply forget’ phase 2 :) 17:40:19 armax: i assumed that plan meant that i get to exercise my asshole mode regularly. :) 17:40:30 otherwise neutron-lib becomes a missed opportunity 17:40:32 dougwig: ack 17:41:01 do i hear a new tagline in there? "Neutron: A Missed Opportunity". 17:41:12 sorry, i'm pulling myself into the weeds. 17:41:18 #topic Do we hate pylint? 17:41:34 no 17:41:36 next topic 17:41:39 so, do we pull in this maintenance nightmare as the status quo, or do we shoot it in the head? yes, i'm biased. and i'm also totally cool either no. 17:41:48 :) 17:41:54 ha, timebox is set to 60 seconds. 17:42:35 so i was thinking we could actually use pylint to enforce some stricter standards 17:42:45 like method length limits 17:42:51 won't your plan of moving then iterating get in the way of that? 17:42:51 and whatnot 17:43:12 You can put pylint exceptions in inline comments 17:43:28 right, or make the existing code compliant before enabling the check 17:43:41 pylint is useful when we have 500 contributors against the same repo 17:44:09 when we have 5, it becomes easier to have a consistent set of coding guidelines 17:44:30 that said, it can provide a decent safety net for a language like python 17:44:46 yeah but we are moving over code that was implemented by 500 contributors 17:45:11 so i vote 'keep status quo' for now. we can always yank it out later 17:45:25 we could trim down the list of pylint violation checks to those that are clearly bad 17:45:36 armax: +1 17:45:36 ok, so it stays, sounds like. i expect this wouldn't even be a topic but for my personal change in beliefs over whether it's worth the cost. 17:46:02 let's move on. 17:46:04 #topic db modules - what moves, what changes? 17:46:17 HenryG: how do we figure out how we attack this? 17:46:37 still not sure 17:46:48 I would like to see less dicts, more objects 17:46:54 what do we mean by db modules in this regard? 17:47:02 less mixins, more composition 17:47:21 so not the db models themselves 17:47:27 but the tools to manipulate them? 17:47:29 if you look in the wiki link above, under 'db rework', you can see a list of db modules used by just a single subrepo. i can break that down further into objects within those modules, but it becomes a big list, fast. 17:48:21 either we move things like the base mixins, or we make something new and update all the subprojects. i'm fine with either approach, but a LOT of modules end up with a dependency chain that ends in neutron.db somewhere, so it's a blocker. 17:48:53 (even some stuff in neutron.common, which just seems like a broken dependency chain that should be fixed) 17:50:00 ok then, let's step back. do we want to move the mixins and support them alongside something new? or go straight to something new? 17:50:28 something new would be cool 17:51:12 not excited about supporting old stuff in the -lib 17:51:59 ok, that's fine, it just adds urgency to getting the 'new' done. what is everyone envisioning there? or put another way, what do you *really* hate today, that needs to die in fire? 17:52:42 well what mixins are used by other projects? 17:52:48 that would be the first ones to tackle 17:52:50 those* 17:53:24 from neutron.db import common_db_mixin as base_db 17:53:45 oh 17:53:47 that 17:53:49 :) 17:53:55 one quick spot check shows: base_db.CommonDbMixin 17:53:55 yeah 17:54:45 i've certainly seen worse subclasses in my life. 17:56:11 if we're not moving that, what were y'all thinking of instead? 17:56:59 model_base can probably go 17:57:54 ok that looks fine I think 17:58:27 kevinbenton: go, or not move? are subprojects allowed to use the standard attributes table? 17:59:25 * dougwig hands around the coffee pot. 18:00:21 dougwig: hmm 18:00:40 ok, let's take this item offline. 18:00:49 dougwig: well as long as they aren't adding automatic relations that will affect everyone 18:00:52 dougwig: yes, that should be fine 18:01:31 let's move on, we'll talk about this more, maybe in person soon. 18:01:39 #topic Open discussion 18:01:44 HenryG: i believe you had a question here. 18:02:26 Gerrit is down but the question is there: https://wiki.openstack.org/wiki/Network/Lib/Meetings 18:03:07 i'm not sure we can block reviews for needing neutron-lib first when it hasn't released yet? it's not even gated against. 18:03:30 yeah but those constants are not used anywhere yet 18:03:56 they're new constants 18:03:59 but we don't have to use debtcollector in the constants in neutron 18:04:05 for new ones at least 18:04:13 then why are we adding them? and will subprojects need them? 18:04:17 we can let them in and just say they will be in neutron-lib next release 18:04:22 * dougwig shakes fist at gerrit. 18:04:53 my removal review will get a merge conflict, so it won't get lost ( https://review.openstack.org/242219 ) 18:06:36 allright, let's let constants go in neutron until we are ready 18:06:58 i think it's fair to immediately move any that were added this cycle too 18:07:05 so we dont' have to debt collect them 18:07:46 right, i don't think we need to debtcollector the new ones. but i'll have the maintenance item to move the interim stuff. 18:09:00 dougwig: are you keeping a list of todo's? 18:09:09 #todo make todo list 18:09:27 HenryG: in the wiki and in my list of open reviews, yes. i know the constants will get caught, because i'll get a conflict. 18:10:10 sounds good 18:10:26 I'll add to the wiki anything without a review or bug yet 18:10:41 anything else today? my biggest action item will be to hunt down HenryG and kevinbenton and get more db change details. today. 18:11:42 todo list item to create todo list created. jk. 18:11:44 dougwig: how about neutron.db.api? 18:12:21 kevinbenton, HenryG: is that good to move, or do we want changes there? 18:12:32 dougwig: ah, but that depends on the common_db_mixin 18:12:39 dougwig: what's our rule for this kind of stuff? 18:12:46 dougwig: can't depend on neutron at all, right? 18:12:51 kevinbenton: didn't you both say it was ok to move common_db_mixin? 18:13:06 kevinbenton: must not depend on neutron. we can move the child dependencies, or sever them. 18:13:12 kevinbenton: only getobject/s 18:13:16 the latter via dup or passing in callbacks. 18:14:00 dougwig: we need to go through common_db_mixin and make sure stuff that is only used internally is appropriately named so it looks private 18:14:16 used internally - only used by the mixin itself 18:14:35 ok, can one of you do so, and when? 18:15:53 I can start later tomorrow or Friday 18:16:05 HenryG: thx 18:16:25 ty. 18:16:43 for neutron lib, should we start doing internal methods prefixed with double underscore so name mangling takes place? 18:16:55 seems like a good place to start focus, thanks kevinbenton 18:17:13 you hit a python bit of trivia i'm unaware of. isn't __ for stuff internal to python itself? 18:17:18 no 18:17:29 ooh neat, please tell. 18:17:30 if you prefix a class method with __ it makes it difficult to access 18:17:50 really?? why are we not using it more places?? 18:17:50 it gets translated 18:18:00 to _classname__method 18:18:04 for external callers 18:18:14 so it's quite clear you are reaching into the bowels of something 18:18:33 that's really good, i'd say yes. 18:18:38 interesting, yes 18:18:41 https://docs.python.org/2/tutorial/classes.html#private-variables-and-class-local-references 18:18:42 any py3 issues or something like that? 18:18:48 not that i'm aware of 18:19:14 The oslo folks have been doing libs for some time. Anything we can learn from them? 18:19:35 so something to note is that it doesn't suggest doing this to prevent people from accessing things 18:19:39 because this is python 18:19:45 "we're all adults" 18:20:02 the convention is just a single underscore means 'internal' and that it might break 18:21:11 So a single underscore should suffice really 18:21:39 switch it to ruby, so i can just mark it private. 18:21:42 * dougwig hides. 18:21:51 * dougwig inside ruby's private namespace. 18:21:53 yes, and if a subclass tries to override a double-prefix it won't do the normal thing 18:22:06 since that's actually translated to _classname__method 18:22:10 they will be different 18:22:29 so if it's not recommended that we use it, should we? why does it even exist? 18:22:51 it's mainly for classes to ensure they have a reference to the function they defined 18:23:07 and not the one overridden by a subclass in inheritance 18:23:31 so it's really to make things private to a class for inheritance purposes 18:23:50 not to prevent people from using it 18:23:58 that makes sense. at least as much as any of python's namespacing makes sense. so a single underscore is the right answer for a library. 18:24:01 i'm now regretting bringing it up :) 18:24:17 now that i'm thinking it through 18:24:21 anything else before we wrap up for today? HenryG, i'll ping you offline and setup a time to chat. 18:24:37 I enjoyed learning about __method kevinbenton 18:24:43 we could add an @private decorator that inspects the call stack and ensures it comes from neutron-lib :) 18:24:58 however, it will probably come at a terrible performance cost 18:25:17 dougwig: ack 18:25:27 one thing that is used by libraries at the module level is the __all__ magic var 18:25:37 it defines what is importable by other modules 18:25:37 kevinbenton: i mean, if people call and _internal routine and we break it, i won't lose any sleep. 18:25:47 /and/an/ 18:25:49 so we can use that for module-level methods 18:25:57 Hi, I would like to know if there is a way to fetch Meatadata of VolumeSnapshot from DB 18:26:12 viveksa: wrong channel. check out #openstack 18:26:21 thanks 18:26:48 ok, let's wrap up this python tutorial session. :) 18:26:53 I wonder if they have an "effective oslo" guide? 18:27:04 not sure 18:27:16 ok 18:27:19 anything else? 18:29:09 ok, let's close this. 18:29:11 #endmeeting