Earlier  
Posted Nick Remark
#openstack-sdks - 2019-08-30
12:32:35 gtema_ should I do this in osc4 branch or in master?
12:34:41 dtroyer gtema_: the osc4 branch is dormant. I rebased what we had into back into master after the last release so osc4 is in master now and will be the next release
12:34:56 gtema_ ah, cool.
12:36:36 dtroyer frickler: ah, ok. next Q then is if it happens only in columns with the new formatting or olny not in those. I've seen it but not kept track of exactly where…
12:45:12 frickler dtroyer: I'm not sure I understand that question. from a quick test up to now I only see this issue for command showing/creating items living in the neutron api
12:50:51 dtroyer frickler: that is probably true as the others do not use SDK
12:52:04 dtroyer the change is the introduction of osc_lib.format_columns module to de-pythonize structured output, a recent example is on https://review.opendev.org/#/c/678689/2/openstackclient/compute/v2/aggregate.py
12:52:40 dtroyer without looking I am hoping we can just make DictColumn understand Munch
12:53:22 dtroyer if Much shows up in columns that are not handled by format_columns then we'll need to fix it on those columns specifically
12:59:28 frickler dtroyer: hmm, I can fix it for one object by inserting invisible_columns = ['location'] here, but I think it would be nice to have a more global solution https://opendev.org/openstack/python-openstackclient/src/branch/master/openstackclient/network/v2/router.py#L78
13:01:43 mordred frickler: yeah - I think it would be nice to generally teach $something what to do when it sees a munch - or a Resource for that matter
13:03:30 dtroyer frickler: I have a thing this morning, will dig in to that after lunch if you guys haven't already solved it all :)
13:12:23 frickler mordred: like that? http://paste.openstack.org/show/767638/
13:13:56 frickler hmm, that looks nice enough to me, I'll submit a patch for it
13:17:20 openstackgerrit Jens Harbott (frickler) proposed openstack/python-openstackclient master: Don't display Munch objects in the output https://review.opendev.org/679445
13:27:20 gtema frickler: just hiding munch columns is not a nice idea. Any complex structure will come out of SDK as munch, so you potentially loose important data
13:27:58 gtema and while currently there is nothing else then location/project, it may be any time later
13:29:04 frickler gtema: the idea is that it should be re-formatted to something that makes sense to an end user before it reaches that point. seeing "Munch(whatever)" in the cli output IMO should never happen
13:29:29 gtema I know, but simply hiding that is also not a way to go
13:29:55 gtema treat is as a dict and show correspondingly, but not simply hide
13:30:39 frickler gtema: the other option would be to just drop the 'location' column for all network objects. the content isn't relevant afaict
13:31:06 mordred frickler: it's a property of every object in sdk actually
13:31:17 frickler ... in an osc context. it sure is relevant in the sdk context
13:32:01 mordred frickler: nod. I'm not sure if it's useful to output from osc - it's mostly there so if you're doing multi-cloud-region things you can tell where a given object is from the object
13:32:20 gtema I wouldn't hide location by definition. In some contexts it might make sense
13:32:24 mordred it might not be super hard to make a generalized location renderer
13:32:29 gtema yea, as mordred said
13:33:05 gtema it's not actually only about location - it will be same for any complex structure in the SDK resource
13:33:42 gtema so there need to be a "apply dict formatter to any munch", and then in the network you can additionally hide location
13:34:46 mordred gtema: yeah. s/munch/resource or munch/
13:35:19 gtema it's following us in multiple contexts :)
13:36:09 mordred gtema: maybe it's not terrible to hide it for now then do a followup patch that unhides it as a placeholder to remind us t deal with it?
13:36:47 gtema beah, I am afraid it would be immediately forgotten
13:37:30 gtema but ok, let us then have a fat TODO/NOTE for that
14:06:11 openstackgerrit Merged openstack/openstacksdk master: Volume.Backup restore fixes https://review.opendev.org/665110
15:54:58 dtroyer so the column formatting is exactly what we added in osc_lib.format_columns, to produce useful output rather than python-formatted strings. We need to either treat Munch as a dict and use DictColumn() or make a MunchColumn() to handle those. I am assuming that type is predictable per column?
16:06:39 mordred dtroyer: yeah. I think treating Munch as a dict type is likely the right choice
16:14:13 mordred hrm. or - maybe a MunchColumn type woudl be right - that way we could run toDict() on it
16:14:19 openstackgerrit Monty Taylor proposed openstack/osc-lib master: Add a MunchColumn type https://review.opendev.org/679474
16:14:29 mordred dtroyer, frickler: ^^ something liek that perhaps
16:19:41 dtroyer mordred: see, I knew if I had lunch first… :) That approach works, is there enough difference to not just use DictColumn()? Other than having to call to_dict(). I am trying to decide if developers should know (or care) if they have a Much or a dict
16:20:48 mordred dtroyer: no - it _should_ behave just the same
16:21:39 mordred oh - yeah - actually - format_dict should totally work perfectly well with either Munch or Resource objects
16:22:06 dtroyer so we really just need to apply the DictColum calls to them… am trying that now
16:22:51 mordred ++
16:25:15 dtroyer \o/ I needed to make a pass through output one more time to catch columns added since the original work was done, that gets it
16:25:34 dtroyer now, nested Munch/dicts :)
16:26:33 dtroyer I am not sure how to represent those in the prettytable output
16:26:52 mordred dtroyer: maybe just as emoji
16:27:21 mordred dtroyer: or, more seriously, maybe with dotted notation ...
16:27:30 mordred do like project.name=foo
16:27:45 dtroyer that would be the cleanest visually
16:27:50 mordred for location = { project: { name: "foo" }}
16:28:35 mordred I mean - I say that - it's probably not really that hard as a recursive call
16:28:36 dtroyer I don't recall if other dicts we processed are nested, I didn't notice that location was before now
16:29:03 mordred I made it nested just to make life harder
16:29:17 dtroyer I would also totally buy doing that in a follow-up
16:30:37 mordred ++
16:32:12 dtroyer I think that could be limited to osc_lib format_dict(), so we'd pick it up when it that gets released
16:34:20 dtroyer mordred: off-topic: do you have a preferred ansible role to run Gerrit? I have not found one that seems to be an obvious choice that seems actively maintained...
16:35:50 mordred funny story - we're working on making one of those right now :)
16:36:01 mordred dtroyer: so ask me that again in couple of weeks
16:36:31 dtroyer heh, wish I could wait… to be part of windmill?
16:37:31 mordred dtroyer: for opendev - we're aiming to switch from puppet to ansible-driven-docker
16:38:22 mordred dtroyer: that said - we install gerrit from upstream docker containers in the zuul docker-compose file and there's ansible around that to set it up ... maybe there's enough there to be helpful?
16:38:59 mordred https://opendev.org/zuul/zuul/src/branch/master/doc/source/admin/examples/docker-compose.yaml
16:39:04 dtroyer is that the QuickStart? I've been down that path and am trying to generalize it a bit
16:39:25 mordred yeah
16:39:40 dtroyer I'm using windmill for the rest and was headed in that direction, sounds like you are too
16:40:36 dtroyer kk, thanks. we can return to our regularly scheduled client-ish topics
16:41:34 mordred dtroyer: https://review.opendev.org/#/c/630406 is the beginning of the change - it's very WIP and needs a bunch more - but that's my current infra task
16:41:52 dtroyer I'll take a peek, thanks
16:41:54 mordred (after a week of Gerrit User Summit though I've finally got the docker images all building solidly :) )
16:47:25 openstackgerrit Monty Taylor proposed openstack/osc-lib master: Handle nested dicts https://review.opendev.org/679474
16:47:40 mordred dtroyer: ^^ that almost works - but seems to have an off-by-one for some reason
16:58:36 dtroyer so ps2 looks good there at first glance
17:54:46 openstackgerrit Dean Troyer proposed openstack/python-openstackclient master: Format location columns in network commands https://review.opendev.org/679490
17:55:36 dtroyer mordred, frickler: ^^ is formatting the network location columns. There may be other network columns that need addressing, this puts the mechanism in place to handle those easily
19:12:40 lifeless win 84
20:27:05 openstackgerrit Dean Troyer proposed openstack/python-openstackclient master: Bump min osc-lib to 1.14.0 https://review.opendev.org/679182
21:29:28 openstackgerrit Merged openstack/openstackclient master: Add Python 3 Train unit tests https://review.opendev.org/637739
#openstack-sdks - 2019-08-31
05:04:30 openstackgerrit Dean Troyer proposed openstack/osc-lib master: Handle nested dicts in format_dict() https://review.opendev.org/679474
05:05:12 dtroyer mordred: ^^ fixes the off-by-one and adds a test
05:11:02 mordred dtroyer: aha! nice
05:24:44 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Strip two more accept headers from object-storage https://review.opendev.org/679532
07:05:51 openstackgerrit Merged openstack/openstacksdk master: Remove Accept header with empty value for HEAD and DELETE requests https://review.opendev.org/679383
14:04:33 openstackgerrit Dean Troyer proposed openstack/python-openstackclient master: Remove races in floating ip functional tests https://review.opendev.org/679541
17:53:45 openstackgerrit Merged openstack/python-openstackclient master: Bump min osc-lib to 1.14.0 https://review.opendev.org/679182
19:43:15 openstackgerrit Merged openstack/python-openstackclient master: Remove races in floating ip functional tests https://review.opendev.org/679541
19:46:15 openstackgerrit Merged openstack/osc-lib master: Handle nested dicts in format_dict() https://review.opendev.org/679474
#openstack-sdks - 2019-09-01
22:36:35 openstackgerrit Hongbin Lu proposed openstack/python-openstackclient master: Bump lower constraint of python-zunclient https://review.opendev.org/679578
#openstack-sdks - 2019-09-02
00:02:42 openstackgerrit Takashi Kajinami proposed openstack/python-openstackclient master: Add parent project filter for listing projects https://review.opendev.org/677103
00:05:44 openstackgerrit Takashi Kajinami proposed openstack/python-openstackclient master: Add parent project filter for listing projects https://review.opendev.org/677103
07:13:00 openstackgerrit Artem Goncharov proposed openstack/openstacksdk master: Strip two more accept headers from object-storage https://review.opendev.org/679532
13:02:45 openstackgerrit Bence Romsics proposed openstack/openstacksdk master: Add router add/remove route operations https://review.opendev.org/674324
14:45:24 openstackgerrit Dean Troyer proposed openstack/osc-lib master: format_dict() returns no value for None https://review.opendev.org/679660
14:55:25 dtroyer frickler: ^^^ proposes a solution to None becoming 'None' in format_dict().
15:26:16 openstackgerrit Merged openstack/python-openstackclient master: Bump lower constraint of python-zunclient https://review.opendev.org/679578
20:27:42 openstackgerrit Jens Harbott (frickler) proposed openstack/cliff master: Pin cmd2 back to <0.9 on all versions https://review.opendev.org/629283
20:48:09 openstackgerrit Jens Harbott (frickler) proposed openstack/cliff master: Pin cmd2 back to <0.9 on all versions https://review.opendev.org/629283

Earlier   Later