/srv/irclogs.ubuntu.com/2020/03/18/#smooth-operator.txt

Chipacamorning!08:47
niemeyerHallo!09:16
Chipacathere's so much neat code in charmhelpers10:15
FacuMuy buenos días a todos!11:00
ChipacaFacu: heyy11:32
FacuChipaca, holas11:33
Chipacaniemeyer: could you take another pass at the testing pr? it seems good to go from where i stand12:07
ChipacaFacu: ditto, wrt docstrings pr12:07
FacuChipaca, sure12:08
* Facu is fighting juju error units... not in his charm, but in postgresql!!12:55
Facustupid postgresql12:57
* Facu kills the unit and re-deploy12:57
Chipaca$ make13:07
ChipacaPlease add copyright headers to the following files:13:07
Chipaca./.git/logs/refs/remotes/jameinel/document-charm.py13:07
Chipaca(and so it goes on)13:07
Chipacasigh13:07
FacuChipaca, not with my branch ;)13:09
Chipacalate late late late13:31
ChipacaFacu: 2020-03-12 12:33:05 <Chipaca> Facu: wrt PrefixedEvent (and thanks to Dmitrii-Sh for pointing this out) means you do self.on["dumper"] and you get a PrefixedEvent that has non-prefixed events on it14:14
ChipacaFacu: that's local time for me, ie GMT14:32
ChipacaFacu: https://irclogs.ubuntu.com/2020/03/12/%23smooth-operator.html#t12:23 FWIW14:35
FacuChipaca, I missed that, thanks14:42
FacuChipaca, so, regarding the change of what an Interface could do to hook into the events through the charm...15:09
Facuwe brought from Frankfurt the idea of doing...15:09
Facu    mysql_relation_events = charm.on.relation_events_for(mysql_relation_name)15:09
Facu    self.framework.observe(mysql_relation_events.joined, self._client_joined)15:09
FacuI changed it a little to be able to not have different methods for the different event types...15:09
Facu    mysql_relation_events = charm.on.events_for(relation=mysql_relation_name)15:09
Facu    self.framework.observe(mysql_relation_events.joined, self._client_joined)15:09
FacuBut we really can do this *now*...15:09
Facu    mysql_events = charm.on[mysql_relation_name]15:09
Facu    self.framework.observe(mysql_events.relation_joined, self._client_joined)15:09
FacuSo don't know if the change is worthwhile...15:09
Facuit looks a little weird accesing 'on' as a dictionary15:10
Facuwe totally could add a method 'get_events_for' which is really __getitem__15:10
Facu    mysql_events = charm.on.get_events_for(mysql_relation_name)15:10
Facu    self.framework.observe(mysql_events.relation_joined, self._client_joined)15:11
* Facu wonders if he should open an issue about this15:13
ChipacaFacu: the on being a dictionary-ish thing was a surprise, indeed15:20
Chipacasorry, was getting coffee :-)15:20
ChipacaFacu: how does that appear in documentation?15:20
Chipacai'd expect an explicit method to be more obvious15:20
Chipacait's also unclear what .keys() or .values() would be used for in this dictionary :-)15:21
FacuChipaca, right, it's interesting to define if we *really* want to present it as a proper dict15:22
Chipacait has that cool-look-what-i-can-do feeling :-)15:23
ChipacaFacu: but it'd be interesting to see it in use15:24
ChipacaBeret: see? it works :-D15:29
Chipacawhole computer feels sluggish, and on closer inspection the freq is stuck at 800MHz or under18:13
Chipacabrb going to reboot into an older kernel to see if it's #22 that's breaking the freq18:39
* Facu eods20:22

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