/srv/irclogs.ubuntu.com/2020/05/15/#smooth-operator.txt

MarkMaglana<mrs. doubtfire impression>Well hellooooo</mrs. doubtfire impression>05:06
MarkMaglana@jam would you mind if I started a discourse thread discussing the different options you mentioned here (https://github.com/canonical/operator/issues/282#issuecomment-627930376). I'm not satisfied with the option I picked but would also like to discuss the other options further before trying them out.07:14
jamMarkMaglana, I'm officially off today, so I probably won't be active in the discussion just yet, but you don't need my approval to start a discussion thread. It sounds like a great idea.07:14
MarkMaglanaexcellent. enjoy your long weekend!07:15
Chipacagood morning all!08:42
Chipacaalso, TGIF08:43
* Chipaca tired08:43
facubatistaMuy buenos días a todos!09:57
Chipacafacubatista: 👋09:57
facubatistahola Chipaca09:58
Chipacafacubatista: if I may make a pairing suggestion, a small cup of #283 would go really well with that mate09:58
mup_PR #283: ops/main: handle dispatch being a shim  <Created by chipaca> <https://github.com/canonical/operator/pull/283>09:58
facubatistaChipaca, yes, I have fresh eyes now10:04
Chipacafacubatista: would you believe me i forgot we were talking about this last10:05
* Chipaca didn't sleep well10:05
facubatistaChipaca, you need a fresh brain (?)10:05
Chipacai'll ask the boys10:05
Chipacaetc10:05
facubatistaChipaca, I think I'm starting to understand; in _JujuEvent.__init__ you will be calling `self._init_dispatch` when having a modern Juju (even if Juju executed the charm via hooks/install), else you will be calling `self._init_legacy` (that in contrast would mean "legacy juju")10:24
facubatistaChipaca, so you may set self.is_dispatch in True, even if it's not the "dispatch" script that was executed, but hooks/install10:24
facubatistaChipaca, right?10:27
Chipacafacubatista: the thing juju executed will have been the dispatch script10:29
facubatistaChipaca, in which case?10:30
Chipacafacubatista: when is_dispatch is true10:31
facubatistaChipaca, I think you're wrong, let's HO?10:32
Chipacafacubatista: in 5?10:33
facubatistaChipaca, deal10:34
facubatistaChipaca, https://meet.google.com/veq-yfqm-kdk, anytime you want10:38
facubatistanew juju, not having a dispatch script:10:49
facubatistaunit-bdv-2: 07:30:00 DEBUG unit.bdv/2.config-changed ============ sysargv0 path '/var/lib/juju/agents/unit-bdv-2/charm/hooks/config-changed'10:49
facubatistaunit-bdv-2: 07:30:00 DEBUG unit.bdv/2.config-changed ============ dispatch path 'hooks/config-changed'10:49
facubatistanew juju, having a dispatch script:10:52
facubatistaunit-bdv-2: 07:51:44 DEBUG unit.bdv/2.upgrade-charm ============ sysargv0 path '/var/lib/juju/agents/unit-bdv-2/charm/dispatch'10:52
facubatistaunit-bdv-2: 07:51:44 DEBUG unit.bdv/2.upgrade-charm ============ dispatch path 'hooks/upgrade-charm'10:52
facubatistaChipaca, +1ed, please check comments11:03
Chipacawill do11:04
Chipacathanks11:04
Chipacafacubatista: is_dispatch_aware ?11:12
facubatistaChipaca, as long it doesn't confuse with "we're the dispatch script", I'm fine11:13
* facubatista brb12:26
* Chipaca ⇝ lunch12:33
* facubatista is back13:11
* Chipaca is back too, somehow13:16
Chipacafacubatista: let me know what you think of 283 now14:25
facubatistaChipaca, ack14:26
Chipacafacubatista: pretty please :)14:26
facubatistaChipaca, +1ed14:58
* MarkMaglana is EOWing. Y'all have a great weekend. Stay safe and healthy, you fine folks you!15:00
mup_PR operator#283 closed: ops/main: handle dispatch being a shim  <Created by chipaca> <Merged by chipaca> <https://github.com/canonical/operator/pull/283>15:40
* facubatista -> lunch15:41
* Chipaca brb (to the shop and back)16:21
* facubatista is back16:46
facubatistaChipaca, jam, pushed my "unittest refactoring", now it's "class based"17:32
Chipacafacubatista: it looks like tmpdir=self.tmpdir should be the default :-)18:12
Chipacafacubatista: but i do understand why not18:14
Chipacafacubatista: the docstring still has the same typos tho18:14
facubatistaChipaca, you don't always has a tmpdir18:15
facubatistaChipaca, we could go to a model of "always having a temp dir", but we would be creating a lot of temp dirs and removing them without need18:16
facubatistaoh, docstring?18:16
Chipacafacubatista: but you could assume self has a tmpdir unless you pass in in_memory=True for eample18:16
facubatistaah, docstring18:16
facubatistaChipaca, so we would change 10 `tmpdir=self.tmpdir` for 30 `in_memory=True`?18:17
Chipacafacubatista: maybe?18:18
Chipacafacubatista: wdyt?18:18
Chipacafacubatista: wwgvrd?18:18
Chipaca:-p18:18
facubatistaENOPARSE18:18
facubatistaChipaca, so, you're not suggesting tmpdir as default just for simplicity... so what for?18:19
Chipacafacubatista: ww(?P<entity>\w+)d == what would $entity do18:19
Chipacafacubatista: I am18:19
Chipacafacubatista: that's what I'm suggesting, yes indeed18:19
Chipacafacubatista: but it's a suggestion, nothing more18:20
facubatistaisn't it simpler to have 10 `tmpdir=self.tmpdir` than 30 `in_memory=True`?18:20
facubatistaChipaca, specially because the onely moments when you pass tmpdir=self.tmpdir is when you're testing what happens between different framework runs18:20
facubatistathe rest of the test suite, that only needs a framework, they don't care where stuff is located18:21
Chipacafacubatista: i might be slow, because i didn't realise it was 10 vs 3018:22
Chipacafacubatista: given that, then the current is fine!18:22
Chipacais it really that split? i thought it was the other way around18:22
* Chipaca counts with his toes18:22
Chipacafacubatista: i count 18 create_framework(), vs 16 create_framework(tmpdir=self.tmpdir), which isn't as bad as you said but still favours the current approach18:25
Chipacafacubatista: sorry for the noise18:25
facubatistaChipaca, https://paste.ubuntu.com/p/MXrT3mx8zv/18:25
Chipacafunny how my impression from the pr was that it was almost all (tmpdir=self.tmpdir)18:25
Chipacafacubatista: i was doing18:26
Chipacagit diff master | grep '^+.*create_framework()'18:26
facubatistaChipaca, because those were the ones that "had a diff"18:26
Chipaca:) ok18:26
Chipacai think i'm going to soft-EOW. pizza is on its way and i think it's well past beer o'clock.18:26
facubatistaChipaca, `+`?18:27
Chipacafacubatista: have a good rest-of-the-fridays, and a great weekend! see you monday18:27
facubatistaI totally NOT understand that grep, but it can wait to Monday :p18:27
facubatistaChipaca, have nice pizza time and a better weekend :)18:28
Chipacafacubatista: it's grep, not egrep, so the + is literal18:45
facubatistaah, you were grepping the diff18:45
* facubatista ends the day in success \o/21:03
facubatistasee you all on Monday21:03

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