dmsimard | krion: I just realized what you meant, it's paid time off -- the boring version of "vacation" :p | 00:12 |
---|---|---|
*** e-tienne has quit IRC | 00:25 | |
openstackgerrit | David Moreau Simard proposed openstack/ara-server master: Implement get_or_create for the File model serializer https://review.openstack.org/638025 | 02:19 |
openstackgerrit | David Moreau Simard proposed openstack/ara-infra master: Import Ansible role for setting up ara-web https://review.openstack.org/635337 | 04:54 |
*** gvincent has joined #ara | 08:39 | |
krion | dmsimard: thanks for empower my knowledge | 09:12 |
*** themroc has joined #ara | 09:38 | |
*** gvincent has quit IRC | 10:18 | |
*** gvincent has joined #ara | 10:18 | |
*** gvincent has quit IRC | 10:26 | |
openstackgerrit | David Moreau Simard proposed openstack/ara-infra master: Import Ansible role for setting up ara-web https://review.openstack.org/635337 | 14:02 |
*** gvincent has joined #ara | 14:08 | |
*** gvincent has quit IRC | 14:10 | |
*** gvincent has joined #ara | 14:10 | |
dmsimard | gvincent: added you to two reviews in ara-server | 14:18 |
dmsimard | For the serializer changes (simple serializer, list serializer, detail serializer, etc.), I would like to try to refactor a bit next | 14:19 |
gvincent | dmsimard, I see, why serializer method field instead of abstraction? | 14:19 |
dmsimard | gvincent: is there a better way ? | 14:19 |
dmsimard | it was already a serializer method field and that worked well -- I just re-worked it a bit to make it a bit cleaner | 14:20 |
gvincent | imagine you decide to add with all serializer using duration, a metric (ms, second, hour) etc | 14:21 |
gvincent | you will need to update every component where you add the serializer method field | 14:21 |
gvincent | with the abstract class, you use the power of polymorphism, you only add one field in the DurationSerializer class | 14:22 |
dmsimard | the implementation in the patch we would only need to update the mixin though, right ? | 14:22 |
dmsimard | Oh, so basically we should keep it as a proper serializer | 14:22 |
gvincent | nop because you need to add an extract field | 14:22 |
gvincent | I'm only asked why this refactoring because it seems to me that we are loosing the polymorphism | 14:23 |
*** etienne has joined #ara | 14:24 | |
dmsimard | gvincent: it bothered me that some serializers were using "DurationSerializer" instead of serializers.ModelSeralizer | 14:24 |
gvincent | yeah they don't have the same parent | 14:25 |
dmsimard | I don't have a strong opinion, we can probably keep it as a serializer like it is already | 14:25 |
*** etienne has quit IRC | 14:25 | |
*** etienne has joined #ara | 14:25 | |
*** etienne has quit IRC | 14:26 | |
*** etienne has joined #ara | 14:26 | |
dmsimard | gvincent: should we standardize on having a "list", "detail" and "simple" serializer for every resource ? | 14:28 |
gvincent | I don't have a strong opinion on this one | 14:29 |
gvincent | I like the idea of adding serializer on the fly when needed | 14:29 |
dmsimard | gvincent: I saw this example of how to select the serializer from the viewset which seemed convenient for the use case: https://stackoverflow.com/a/22755648 | 14:30 |
gvincent | yeah this is one solution | 14:31 |
dmsimard | unrelated 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.py | 14:33 |
dmsimard | and I was considering splitting out our serializers.py because it would get too big when in reality I guess it's pretty small :p | 14:33 |
openstackgerrit | David Moreau Simard proposed openstack/ara-server master: Use DurationSerializer for the results, they have a duration https://review.openstack.org/637982 | 15:07 |
dmsimard | gvincent: ^ was the original intended change | 15:07 |
*** bcoca has joined #ara | 15:14 | |
*** themroc has quit IRC | 16:45 | |
*** themroc has joined #ara | 18:25 | |
*** themroc has quit IRC | 20:50 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!