[05:06] <MarkMaglana> <mrs. doubtfire impression>Well hellooooo</mrs. doubtfire impression>
[07:14] <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] <jam> MarkMaglana, 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:15] <MarkMaglana> excellent. enjoy your long weekend!
[08:42] <Chipaca> good morning all!
[08:43] <Chipaca> also, TGIF
[08:43]  * Chipaca tired
[09:57] <facubatista> Muy buenos días a todos!
[09:57] <Chipaca> facubatista: 👋
[09:58] <facubatista> hola Chipaca
[09:58] <Chipaca> facubatista: if I may make a pairing suggestion, a small cup of #283 would go really well with that mate
[09:58] <mup_> PR #283: ops/main: handle dispatch being a shim  <Created by chipaca> <https://github.com/canonical/operator/pull/283>
[10:04] <facubatista> Chipaca, yes, I have fresh eyes now
[10:05] <Chipaca> facubatista: would you believe me i forgot we were talking about this last
[10:05]  * Chipaca didn't sleep well
[10:05] <facubatista> Chipaca, you need a fresh brain (?)
[10:05] <Chipaca> i'll ask the boys
[10:05] <Chipaca> etc
[10:24] <facubatista> Chipaca, 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] <facubatista> Chipaca, so you may set self.is_dispatch in True, even if it's not the "dispatch" script that was executed, but hooks/install
[10:27] <facubatista> Chipaca, right?
[10:29] <Chipaca> facubatista: the thing juju executed will have been the dispatch script
[10:30] <facubatista> Chipaca, in which case?
[10:31] <Chipaca> facubatista: when is_dispatch is true
[10:32] <facubatista> Chipaca, I think you're wrong, let's HO?
[10:33] <Chipaca> facubatista: in 5?
[10:34] <facubatista> Chipaca, deal
[10:38] <facubatista> Chipaca, https://meet.google.com/veq-yfqm-kdk, anytime you want
[10:49] <facubatista> new juju, not having a dispatch script:
[10:49] <facubatista> unit-bdv-2: 07:30:00 DEBUG unit.bdv/2.config-changed [10:49] <facubatista> unit-bdv-2: 07:30:00 DEBUG unit.bdv/2.config-changed [10:52] <facubatista> new juju, having a dispatch script:
[10:52] <facubatista> unit-bdv-2: 07:51:44 DEBUG unit.bdv/2.upgrade-charm [10:52] <facubatista> unit-bdv-2: 07:51:44 DEBUG unit.bdv/2.upgrade-charm [11:03] <facubatista> Chipaca, +1ed, please check comments
[11:04] <Chipaca> will do
[11:04] <Chipaca> thanks
[11:12] <Chipaca> facubatista: is_dispatch_aware ?
[11:13] <facubatista> Chipaca, as long it doesn't confuse with "we're the dispatch script", I'm fine
[12:26]  * facubatista brb
[12:33]  * Chipaca ⇝ lunch
[13:11]  * facubatista is back
[13:16]  * Chipaca is back too, somehow
[14:25] <Chipaca> facubatista: let me know what you think of 283 now
[14:26] <facubatista> Chipaca, ack
[14:26] <Chipaca> facubatista: pretty please :)
[14:58] <facubatista> Chipaca, +1ed
[15:00]  * MarkMaglana is EOWing. Y'all have a great weekend. Stay safe and healthy, you fine folks you!
[15:40] <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:41]  * facubatista -> lunch
[16:21]  * Chipaca brb (to the shop and back)
[16:46]  * facubatista is back
[17:32] <facubatista> Chipaca, jam, pushed my "unittest refactoring", now it's "class based"
[18:12] <Chipaca> facubatista: it looks like tmpdir=self.tmpdir should be the default :-)
[18:14] <Chipaca> facubatista: but i do understand why not
[18:14] <Chipaca> facubatista: the docstring still has the same typos tho
[18:15] <facubatista> Chipaca, you don't always has a tmpdir
[18:16] <facubatista> Chipaca, 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 need
[18:16] <facubatista> oh, docstring?
[18:16] <Chipaca> facubatista: but you could assume self has a tmpdir unless you pass in in_memory=True for eample
[18:16] <facubatista> ah, docstring
[18:17] <facubatista> Chipaca, so we would change 10 `tmpdir=self.tmpdir` for 30 `in_memory=True`?
[18:18] <Chipaca> facubatista: maybe?
[18:18] <Chipaca> facubatista: wdyt?
[18:18] <Chipaca> facubatista: wwgvrd?
[18:18] <Chipaca> :-p
[18:18] <facubatista> ENOPARSE
[18:19] <facubatista> Chipaca, so, you're not suggesting tmpdir as default just for simplicity... so what for?
[18:19] <Chipaca> facubatista: ww(?P<entity>\w+)d == what would $entity do
[18:19] <Chipaca> facubatista: I am
[18:19] <Chipaca> facubatista: that's what I'm suggesting, yes indeed
[18:20] <Chipaca> facubatista: but it's a suggestion, nothing more
[18:20] <facubatista> isn't it simpler to have 10 `tmpdir=self.tmpdir` than 30 `in_memory=True`?
[18:20] <facubatista> Chipaca, specially because the onely moments when you pass tmpdir=self.tmpdir is when you're testing what happens between different framework runs
[18:21] <facubatista> the rest of the test suite, that only needs a framework, they don't care where stuff is located
[18:22] <Chipaca> facubatista: i might be slow, because i didn't realise it was 10 vs 30
[18:22] <Chipaca> facubatista: given that, then the current is fine!
[18:22] <Chipaca> is it really that split? i thought it was the other way around
[18:22]  * Chipaca counts with his toes
[18:25] <Chipaca> facubatista: 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 approach
[18:25] <Chipaca> facubatista: sorry for the noise
[18:25] <facubatista> Chipaca, https://paste.ubuntu.com/p/MXrT3mx8zv/
[18:25] <Chipaca> funny how my impression from the pr was that it was almost all (tmpdir=self.tmpdir)
[18:26] <Chipaca> facubatista: i was doing
[18:26] <Chipaca> git diff master | grep '^+.*create_framework()'
[18:26] <facubatista> Chipaca, because those were the ones that "had a diff"
[18:26] <Chipaca> :) ok
[18:26] <Chipaca> i think i'm going to soft-EOW. pizza is on its way and i think it's well past beer o'clock.
[18:27] <facubatista> Chipaca, `+`?
[18:27] <Chipaca> facubatista: have a good rest-of-the-fridays, and a great weekend! see you monday
[18:27] <facubatista> I totally NOT understand that grep, but it can wait to Monday :p
[18:28] <facubatista> Chipaca, have nice pizza time and a better weekend :)
[18:45] <Chipaca> facubatista: it's grep, not egrep, so the + is literal
[18:45] <facubatista> ah, you were grepping the diff
[21:03]  * facubatista ends the day in success \o/
[21:03] <facubatista> see you all on Monday