Wednesday, 2019-02-20

dmsimardkrion: I just realized what you meant, it's paid time off -- the boring version of "vacation" :p00:12
*** e-tienne has quit IRC00:25
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Implement get_or_create for the File model serializer  https://review.openstack.org/63802502:19
openstackgerritDavid Moreau Simard proposed openstack/ara-infra master: Import Ansible role for setting up ara-web  https://review.openstack.org/63533704:54
*** gvincent has joined #ara08:39
kriondmsimard: thanks for empower my knowledge09:12
*** themroc has joined #ara09:38
*** gvincent has quit IRC10:18
*** gvincent has joined #ara10:18
*** gvincent has quit IRC10:26
openstackgerritDavid Moreau Simard proposed openstack/ara-infra master: Import Ansible role for setting up ara-web  https://review.openstack.org/63533714:02
*** gvincent has joined #ara14:08
*** gvincent has quit IRC14:10
*** gvincent has joined #ara14:10
dmsimardgvincent: added you to two reviews in ara-server14:18
dmsimardFor the serializer changes (simple serializer, list serializer, detail serializer, etc.), I would like to try to refactor a bit next14:19
gvincentdmsimard, I see, why serializer method field instead of abstraction?14:19
dmsimardgvincent: is there a better way ?14:19
dmsimardit was already a serializer method field and that worked well -- I just re-worked it a bit to make it a bit cleaner14:20
gvincentimagine you decide to add with all serializer using duration, a metric (ms, second, hour) etc14:21
gvincentyou will need to update every component where you add the serializer method field14:21
gvincentwith the abstract class, you use the power of polymorphism, you only add one field in the DurationSerializer class14:22
dmsimardthe implementation in the patch we would only need to update the mixin though, right ?14:22
dmsimardOh, so basically we should keep it as a proper serializer14:22
gvincentnop because you need to add an extract field14:22
gvincentI'm only asked why this refactoring because it seems to me that we are loosing the polymorphism14:23
*** etienne has joined #ara14:24
dmsimardgvincent: it bothered me that some serializers were using "DurationSerializer" instead of serializers.ModelSeralizer14:24
gvincentyeah they don't have the same parent14:25
dmsimardI don't have a strong opinion, we can probably keep it as a serializer like it is already14:25
*** etienne has quit IRC14:25
*** etienne has joined #ara14:25
*** etienne has quit IRC14:26
*** etienne has joined #ara14:26
dmsimardgvincent: should we standardize on having a "list", "detail" and "simple" serializer for every resource ?14:28
gvincentI don't have a strong opinion on this one14:29
gvincentI like the idea of adding serializer on the fly when needed14:29
dmsimardgvincent: I saw this example of how to select the serializer from the viewset which seemed convenient for the use case: https://stackoverflow.com/a/2275564814:30
gvincentyeah this is one solution14:31
dmsimardunrelated but I look at how awx does certain things sometimes and they have a 5k lines serializers.py: https://github.com/ansible/awx/blob/devel/awx/api/serializers.py14:33
dmsimardand I was considering splitting out our serializers.py because it would get too big when in reality I guess it's pretty small :p14:33
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Use DurationSerializer for the results, they have a duration  https://review.openstack.org/63798215:07
dmsimardgvincent: ^ was the original intended change15:07
*** bcoca has joined #ara15:14
*** themroc has quit IRC16:45
*** themroc has joined #ara18:25
*** themroc has quit IRC20:50

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