Friday, 2017-02-10

*** VW has quit IRC00:09
*** david-lyle has joined #craton00:09
*** david-lyle has quit IRC00:20
*** VW has joined #craton00:29
*** VW_ has joined #craton00:33
*** VW has quit IRC00:33
*** VW_ has quit IRC00:36
*** Syed__ has quit IRC02:05
*** harlowja has quit IRC02:53
sulook here is the patch for search by label: https://review.openstack.org/#/c/432283/12:30
*** VW has joined #craton13:06
thomasemReviewing13:41
thomasemsulo: so this converts to an exists subquery?14:04
thomasem`AND (EXISTS (SELECT 1 \nFROM labels \nWHERE devices.id = labels.device_id AND labels.label = :label_1)`14:04
thomaseminstead of what was previously a join that was causing the issue14:04
thomasemor at least having some issue :P14:04
sulothomasem: yes, it will be a any query .. instead of a join14:27
thomasemCool14:44
thomasemrefactoring project variables to use generic, I'm debating how we want to handle the root/admin permissions on those calls.14:44
suloyeah it would have been nice to have some rbac impl there but given what we have14:45
suloi guess it makes sense to allow users in the project access to vars14:45
thomasemYeah, but we'd still want to lock down updating/deleting vars, no?14:46
thomasemOr shall we just leave that for the RBAC impl?14:46
suloi would just leave it tbh, i dunno its worth all the work to implement any code for this now14:46
suloespcially gien jimbaker is quite close to the rabc patch14:47
suloclose to finishing14:47
thomasemOkay, cool. Then, yeah, I'm cool w/ that.14:47
thomasemThanks, sulo!14:47
*** jovon has joined #craton15:22
thomasemAh, bummer... more snags because project_id is a UUID instead of int, like the generic variables tests assume.15:32
jimbakersulo, https://review.openstack.org/#/c/432355/15:45
jimbakersulo, i assume that the current API for DELETE (which git-harry did reproduce as part of his refactoring yesterday) was not your intent15:46
jimbakerbut see that change for more15:46
git-harryYes, I listed this, in the variables spec I wrote, as being something as counter-intuitive but I didn't want to change the API as part of the refactor15:48
sulojimbaker: git-harry: was it taking a dict with k:v then just deleting the k before ?15:53
sulothat sounds about right, iirc15:53
jimbakersulo, no it took v:k15:54
sulovalue : key ??15:54
git-harrymore like _: k15:54
jimbakeryes15:54
jimbakercorrect15:54
jimbakerthe value was ignored15:54
sulojimbaker: yeah i think i was just iterating on the keys and nuking them regardless of what the value was15:55
jimbakerno one expected the dictionary inversion!15:55
jimbaker;)15:55
suloanyway this is the right way to go about doing it15:55
suloi dunno why i did that than just passing list and nuking15:55
sulo:/15:55
jimbakersulo, git-harry and i both understood the intent. although i had to dive in the code, the errors reported by the API were interesting15:56
jimbakersulo, no worries15:56
jimbakeranyway, if we can fast track that review - i need that for the client change so we can support deletes15:56
jimbakerone thing i wanted to discuss yesterday but we ran out of time15:57
jimbakerin general, the vars spec that harry put together is great in terms of recommending JSON PATCH. but i think partial DELETE and partial PUT to represent better how variables are a mapping would work better15:58
jimbakerie, let's keep it the way it is now, assuming the DELETE fix i just proposed15:58
jimbakerfor nonpartial usage of PUT and DELETE, there is a simple solution: just fully PUT the desired object. or fully specify the list of keys to DELETE16:00
git-harryYup, as I said in the spec, there are many ways to do this. The point about the current implementation of PUT and DELETE is that it goes against the RFCs and API-WG guidelines.16:02
*** acabot has quit IRC16:09
thomasemTo what degree do we intend to follow the API-WG guidelines?16:24
thomasemBecause, yeah... it's a bit weird right now16:24
sigmavirusthomasem: git-harry, I think, wants us to follow them to the letter16:29
thomasemOkay. What about others? :)16:29
thomasemI'm trying to get a general gauge for folks' opinions. Not suggesting anything, btw.16:30
sigmavirusI think they're more or less a good idea but that we have some time before we need to meet every guideline16:30
sigmavirusAnd that the work we're doing now to match every guideline is slowing down priorities by causing merge conflicts16:30
*** Syed__ has joined #craton16:31
git-harryI'm not sure you're following a standard unless you're following it to the letter.16:31
git-harryI don't think the merge conflicts are a big deal, rebasing is not that hard16:31
git-harryand that is separate.16:31
sigmavirusgit-harry: it is not hard but it is time consuming16:32
sigmavirusAnd it's especially time consuming for those of us not properly allowed to ever focus on one project16:32
git-harryOne is if we should change things, the other is when16:32
jimbakerright. so guidelines are just tht16:33
thomasemSo, it's a goal to get there, but we are willing to focus on priorities at the expense of technical debt in that area. The hesitations I have are related to deprecation strategies and how long we HAVE to keep the technical debt around. That being said, if we don't remain relevant and move quick enough, it won't matter anyway.16:33
jimbakerif following guidelines means that the only practical way to use REST with variables is via JSON PATCH, i don't think that's realistic16:33
thomasemSwap out some periods for question marks in my message, lol.16:33
jimbakeri don't even see it as tech debt16:33
thomasemWasn't meaning to assert.16:33
sigmavirusthomasem: so there have been 0 releases of craton16:34
thomasemRight16:34
sigmavirusSo we have no deprecation strategy that we are required to follow16:34
jimbaker+116:34
sigmavirusWe have no users because craton is not presently meeting their requirements16:34
sigmavirusAnd so we don't have to worry about breaking early adopters16:34
sigmavirusAnd for young projects, they tend to move fast and break things16:35
jimbaker+10016:35
sigmavirusIf we care about deprecation strategies we could start looking into microversioning early on the right way (not the glance way) and then our deprecation strategy will be solved16:35
thomasemMmmm, yeah. I mean, we can do it in a stable way so as to not cause too much disruption once we do release.16:35
thomasemYeah, that's the reason I'm bringing this up16:35
jimbakeri don't think we are going to get a lot of pushback by changing APIs in the next few months. we definitely will not get pushback if we change our APIs now :)16:36
sigmavirusTo be fair, getting started with microversioning now would be good16:36
jimbakerwe do need to preserve the data, through good migrations. that's a given16:36
sigmavirusBut that's a lot of upfront effort16:36
jimbakerright now we have more important priorities16:37
sigmavirusAlso having rolling upgrades early on would be good16:37
sigmavirusexactly16:37
sigmavirusLuckily we already use alembic so we're farther along for RU than most other "openstack" projects16:37
jimbakeragreed on rolling upgrades. and we got some practice as a team on going through complex migrations16:38
jimbakermore complex than i actually anticipate needing to do16:38
jimbaker(even thought of submitting a talk on alembic based on that experience, before we wisely "rolled" that effort back!)16:38
jimbaker(for pycon)16:38
jimbakerso the actual tech debt we have is16:39
jimbaker1. we should support JSON PATCH where it makes sense; but in example continue to provide a reasonable alternative path that better corresponds to how variables are used in their lifecycle (these alternatives are not tech debt)16:40
jimbaker2. support microversions16:40
thomasemI'm not going to plant my feet over it. I do see a risk associated if we go rapidly changing things after release to try and bring it into compliance with the expected guidelines. IF we don't version, any tooling that consumes this API will also have to change along with it.16:40
jimbakerthomasem, but early customers are going to be using the tooling16:40
thomasemI'm not sure I follow what you're trying to convey by that statement?16:41
jimbakerthomasem, they are going to use the client/CLI16:41
thomasemOkay, so we're going to call our API unstable?16:41
thomasemand suggest client/CLI use as opposed to writing things against the API itself.16:41
thomasemUntil we cut a stable API?16:42
jimbakerwe are going to minimize changes to the API16:42
jimbakerbut until we implement microversioning, yes, i think that's best. right now, i see the real changes are additions however - and adjustments where there were obvious bugs16:42
thomasemSure. As long as we're explicit about the API limitations, I'm fine with that.16:43
jimbakerthis stuff comes up in the python lang/library dev, to wit, why are you breaking my code by fixing that bug ;)16:43
jimbakeri should be able to depend on that bug16:43
jimbakerguido van rossum has a simple answer. "no."16:43
thomasemHaha, of course. I've just become more of a stable than volatile guy over the years due to things like that. So, that's where my mind's at about it.16:44
jimbakernow if it's a better design - and that can be hard to distinguish from a bug - that's another matter altogether16:45
thomasemSo, I hope I'm introducing some healthy dissension and not an extreme.16:45
thomasemWell, I've never passed a body to a DELETE call before.16:45
thomasemSo, that's different. :)16:45
jimbakerfor example iirc list comprehensions leak their iterator variable in at least python 2 (don't recall if changed in 3)16:45
jimbakerthomasem, yeah, but how does one delete a variable then?16:46
thomasemI believe it was fixed in 3.16:46
thomasempartial PUT or PATCH16:46
jimbakerhow do we distinguish a deletion from setting to null/None?16:46
thomasemin the PUT scenario you expect a full list of variables you want to be set and update accordingly on our side.16:46
jimbakerif we do PUT16:46
thomasemin the PATCH scenario, you set the 'path' to the variable you wish to remove16:46
thomasemand "op": "remove"16:47
jimbakerthomasem, but the expectation is that there will be many variables, not just a few16:47
thomasemSo?16:47
jimbakeri agree that PATCH is better here16:47
jimbakerso apparently we disagree :)16:47
thomasemAre you talking thousands?16:47
thomasemhundreds?16:47
jimbakercertainly could be hundreds16:48
jimbakernow we have put the burden of managing that on the client16:48
thomasemOkay. Just thinking if it's programmatically doing it, you'd GET the variables, update the list, then PUT with the new list.16:48
jimbakeralso consider what it means with namespaces16:48
thomasemupdate the dict*16:48
jimbakerwhich presumably should allow for some isolation16:48
thomasemRight... I suppose then you'd have an even easier time?16:49
jimbakerso PUT is update the dict16:49
jimbakersure. except i would like to use namespaces like they are in python16:49
jimbakernot in java16:49
jimbakershould have plenty of flexibility in their usage, including flattening16:50
jimbakerby import16:50
thomasemSo, let's do an example16:50
git-harryIt would be nice to capture this conversation in the spec16:50
thomasemI'm sorry, git-harry, you're right.16:50
jimbakergit-harry, fortunately it's being logged16:50
jimbakerso we can discuss, and spec-ify from this16:51
git-harryokay, just want to make sure there is an outcome16:51
thomasemYeah, beers after work.16:51
thomasem:D16:51
jimbakerhttp://eavesdrop.openstack.org/irclogs/%23craton/latest.log.html#t2017-02-10T15:45:5916:52
jimbakeris the approx starting point16:53
thomasemSo, I want to better understand the imagined implementation for namespaces as it relates... So, how could several layers deep be interacted with via the API, let's say `maintenance.foo.bar`16:53
thomasemas the namespace16:53
thomasemHow would you want to DELETE a variable from that namespace?16:54
* sulo payes attention to the channel, seems like there is some interesting convo going on here16:55
sulough i cant even type16:55
* sulo goes back to day dreaming 16:55
Syed__haha16:56
jimbakerso first, i'm proposing maintenance/foo/bar16:57
jimbakerbecause / is now allowed in ansible, but is valid in URLs16:57
jimbakerNOT16:57
thomasemSo, curl -X DELETE http://localhost:8080/hosts/1/variables/maintenance/foo/bar ...?16:57
jimbakeruhh, most certainly not16:58
thomasemhaha, okay, good16:58
jimbakermore for stuff like var search, imports, that sort of thing. think url query params16:58
thomasemGotcha, okay16:58
thomasemso ?namespace=maintenance/foo/bar16:58
jimbakerthe whole idea is that we can implement namespaces today16:58
jimbakerjust try it16:58
*** VW_ has joined #craton16:58
jimbakerit becomes convention; and the client has to do its own filtering16:58
jimbakerok, although this discussion is great, i have a meeting to go to16:59
thomasemOh, no worries! We'll pick it up at some point. I think there are indeed more pressing matters immediate-term.16:59
thomasemThanks for the discussion and let's pick it up later?17:00
*** VW_ has quit IRC17:00
*** VW__ has joined #craton17:00
*** VW has quit IRC17:02
*** VW__ has quit IRC17:02
*** VW has joined #craton17:02
*** VW_ has joined #craton17:03
*** VW has quit IRC17:03
*** harlowja has joined #craton17:05
*** harlowja has quit IRC17:05
*** harlowja has joined #craton17:05
*** VW_ has quit IRC17:23
*** VW has joined #craton17:24
*** VW has quit IRC18:08
*** VW has joined #craton18:11
jimbakersulo, so device search by label continues to work18:27
jimbakeri guess this means we can save for the time being, even though i still think we should move to a vars approach18:27
jimbakeri will take a look at that change; please look at the delete support since i would like to get the client/cli variables support finished up18:28
jimbakerhttps://review.openstack.org/#/c/432355/ needs reviews :)18:28
thomasemI will review it right after lunch.18:30
thomasembrb18:30
*** VW has quit IRC18:32
*** rainya has joined #craton19:03
*** rainya has quit IRC19:03
*** tojuvone has quit IRC19:07
*** VW has joined #craton19:29
toanjimbaker: are you here sir?19:58
jimbakerhi19:58
toanhey jimbaker, do you have a few minutes to chat about rpc plan?19:59
jimbakersure thing19:59
jimbakeron vidyo?19:59
toancool, could you join my vid room?19:59
toanant, kevin, dusty and farid are there as well19:59
faridthomasem: ^20:00
jimbakerthomasem, ^^^20:00
*** VW has quit IRC20:26
*** jovon has quit IRC20:32
*** VW has joined #craton20:51
thomasemfarid, toan: I was in a collision on my way back from lunch and just finally got home.20:54
toanthomasem: hope you're ok20:54
thomasemI'm okay, just a little shaken up, so I'm going to step away.20:54
thomasemWanted to let y'all know what happened.20:54
*** VW has quit IRC20:54
toanok, thanks. pls just take care of your situation20:55
thomasemThanks, toan20:55
faridthomasem: oh no!20:55
faridthomasem: take care man, talk to you later20:56
*** VW has joined #craton20:57
jimbakerthomasem, glad you are ok, but do take that time21:12
*** VW has quit IRC21:25
*** VW has joined #craton21:29
*** VW has quit IRC21:57
*** VW has joined #craton22:10
*** VW_ has joined #craton22:11
*** VW has quit IRC22:11
*** VW has joined #craton22:55
*** VW has quit IRC22:58
*** VW has joined #craton22:58
*** VW_ has quit IRC22:59
*** VW has quit IRC22:59
*** VW has joined #craton23:00
*** VW has quit IRC23:17

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!