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 |
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:14 |
MarkMaglana | excellent. enjoy your long weekend! | 07:15 |
Chipaca | good morning all! | 08:42 |
Chipaca | also, TGIF | 08:43 |
* Chipaca tired | 08:43 | |
facubatista | Muy buenos días a todos! | 09:57 |
Chipaca | facubatista: 👋 | 09:57 |
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> | 09:58 |
facubatista | Chipaca, yes, I have fresh eyes now | 10:04 |
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:05 |
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:24 |
facubatista | Chipaca, right? | 10:27 |
Chipaca | facubatista: the thing juju executed will have been the dispatch script | 10:29 |
facubatista | Chipaca, in which case? | 10:30 |
Chipaca | facubatista: when is_dispatch is true | 10:31 |
facubatista | Chipaca, I think you're wrong, let's HO? | 10:32 |
Chipaca | facubatista: in 5? | 10:33 |
facubatista | Chipaca, deal | 10:34 |
facubatista | Chipaca, https://meet.google.com/veq-yfqm-kdk, anytime you want | 10:38 |
facubatista | new juju, not having a dispatch script: | 10:49 |
facubatista | unit-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 |
facubatista | unit-bdv-2: 07:30:00 DEBUG unit.bdv/2.config-changed ============ dispatch path 'hooks/config-changed' | 10:49 |
facubatista | new juju, having a dispatch script: | 10:52 |
facubatista | unit-bdv-2: 07:51:44 DEBUG unit.bdv/2.upgrade-charm ============ sysargv0 path '/var/lib/juju/agents/unit-bdv-2/charm/dispatch' | 10:52 |
facubatista | unit-bdv-2: 07:51:44 DEBUG unit.bdv/2.upgrade-charm ============ dispatch path 'hooks/upgrade-charm' | 10:52 |
facubatista | Chipaca, +1ed, please check comments | 11:03 |
Chipaca | will do | 11:04 |
Chipaca | thanks | 11:04 |
Chipaca | facubatista: is_dispatch_aware ? | 11:12 |
facubatista | Chipaca, as long it doesn't confuse with "we're the dispatch script", I'm fine | 11:13 |
* facubatista brb | 12:26 | |
* Chipaca ⇝ lunch | 12:33 | |
* facubatista is back | 13:11 | |
* Chipaca is back too, somehow | 13:16 | |
Chipaca | facubatista: let me know what you think of 283 now | 14:25 |
facubatista | Chipaca, ack | 14:26 |
Chipaca | facubatista: pretty please :) | 14:26 |
facubatista | Chipaca, +1ed | 14: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 -> lunch | 15:41 | |
* Chipaca brb (to the shop and back) | 16:21 | |
* facubatista is back | 16:46 | |
facubatista | Chipaca, jam, pushed my "unittest refactoring", now it's "class based" | 17:32 |
Chipaca | facubatista: it looks like tmpdir=self.tmpdir should be the default :-) | 18:12 |
Chipaca | facubatista: but i do understand why not | 18:14 |
Chipaca | facubatista: the docstring still has the same typos tho | 18:14 |
facubatista | Chipaca, you don't always has a tmpdir | 18:15 |
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:16 |
facubatista | Chipaca, so we would change 10 `tmpdir=self.tmpdir` for 30 `in_memory=True`? | 18:17 |
Chipaca | facubatista: maybe? | 18:18 |
Chipaca | facubatista: wdyt? | 18:18 |
Chipaca | facubatista: wwgvrd? | 18:18 |
Chipaca | :-p | 18:18 |
facubatista | ENOPARSE | 18:18 |
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:19 |
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:20 |
facubatista | the rest of the test suite, that only needs a framework, they don't care where stuff is located | 18:21 |
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:22 | |
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:25 |
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:26 |
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:27 |
facubatista | Chipaca, have nice pizza time and a better weekend :) | 18:28 |
Chipaca | facubatista: it's grep, not egrep, so the + is literal | 18:45 |
facubatista | ah, you were grepping the diff | 18:45 |
* facubatista ends the day in success \o/ | 21:03 | |
facubatista | see you all on Monday | 21:03 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!