/srv/irclogs.ubuntu.com/2020/04/08/#smooth-operator.txt

jammorning all04:16
Dmitrii-Shmoring jam04:25
Dmitrii-Shmorning*04:26
t0mb0are there any examples for testing operator charms?07:24
Dmitrii-Sht0mb0: we have PRs for interfaces with unit tests that use the test harness which was recently merged (https://github.com/canonical/operator/pull/146/files)07:32
Dmitrii-ShI am working on getting my interface PRs to a better state and will then switch my charm PRs07:34
Dmitrii-Shhttps://github.com/canonical/cockroachdb-operator/pull/1/files - this charm PR has unit tests but they are for the peer relation07:34
Dmitrii-ShI have a task to make it more modular so that I can test it in isolation from the operations that mutate the underlying machine and calls to network-get which are not yet handled by the harness07:36
Dmitrii-Sht0mb0: sorry it's at that stage right now but I am doing what I can to move it forward07:37
mthaddonDmitrii-Sh: how much are you expecting in the way of changes to how testing is done in the framework? Just wondering if it's worth us / t0mb0 investing time in beginning to write tests now, or whether we should hold off for a bit07:41
mthaddontest/test_cluster.py certainly looks like it has some useful examples from https://github.com/canonical/cockroachdb-operator/pull/1/files but just want to confirm how much we'd expect things to change at this point07:42
Dmitrii-Shmthaddon: I would expect remote_app_data parameter to disappear here https://github.com/canonical/operator/blob/11a1849205d750e28aaa4a13938b5864659f928b/ops/testing.py#L143 per a discussion in https://github.com/canonical/operator/issues/211 but so far I am not aware of any other changes.07:45
Dmitrii-ShI think it's worthwhile to start using the harness as-is07:45
mthaddonDmitrii-Sh: thx - sounds like some minor changes, but certainly worth getting started with it. t0mb0 ^07:46
niemeyerMorning all07:47
Dmitrii-Shmorning07:48
niemeyermthaddon, t0mb0: If you find any issues / struggles with the harness, this is a good time to raise them07:48
niemeyerjam has been pushing it forward and polishing it as we go07:48
mthaddonthx07:49
t0mb0no worries will dpo07:50
t0mb0*do07:50
niemeyerjam: Second review on #20908:30
Chipacamoin moin moin08:35
jamthanks niemeyer08:36
jammorning Chipaca08:36
niemeyerChipaca: Morning!08:38
niemeyerChipaca: You just got another review on #20308:38
Chipacaniemeyer: 👍08:38
niemeyerjam: You have another review on #196 as well09:30
* Chipaca takes a break09:54
Chipacadang, i messed up the revue thing10:36
Dmitrii-ShUpdated 216. I got rid of pickle but we still need to discuss serialization.11:13
facubatistaMuy buenos días a todos!11:13
Dmitrii-Shfacubatista o/11:14
Chipacafacubatista: buen día!11:14
facubatistahola Dmitrii-Sh, Chipaca :)11:14
ChipacaI'm off to make lunch for m'boys11:14
niemeyerOff to lunch as well11:14
facubatistahave a nice lunch!11:15
t0mb0Dmitrii-Sh, is state something that the harness supports? https://pastebin.canonical.com/p/V44mnMF9NK/ I've tried to pass my charm to the harness but it seems to trip up creating the state attribute11:54
jamt0mb0, https://github.com/canonical/operator/pull/19911:55
jamprobably you just need to update your operator directory11:55
Dmitrii-Sht0mb0: jam speaks the truth :^)11:56
t0mb0well thats easy!11:56
Dmitrii-Sht0mb0: git submodule update --recursive --remote11:57
Dmitrii-Shthat's one way to update all of your submodules11:57
t0mb0\o/ works12:04
Dmitrii-Shgreat!12:06
* facubatista brb, doorbell12:12
jamfacubatista, ping me when you'are back12:17
* facubatista is back12:56
facubatistasorry it took long, it was the meat delivery12:56
* niemeyer is sort of back too.. starting the meeting marathon12:56
facubatistajam, ping, I'm back :)12:58
jamhi facubatista, just hitting my meetings now as well. I wanted to check up on https://github.com/canonical/operator/pull/20913:02
jamDmitrii-Sh, it seems https://bugs.launchpad.net/juju/+bug/1854635 didn't actually get backported. So it will be in 2.7.6 (landed today)13:03
Dmitrii-Shjam: ok, then my tests were sane13:04
facubatistajam, we initiated a conversation in IRC, so for that to not be forgotten, I wrote this comment: https://github.com/canonical/operator/pull/209#issuecomment-60998336713:04
ChipacaDmitrii-Sh: huzzah for sane tests13:04
facubatistajam, I kind of was expecting to continue the conversation there13:05
jamfacubatista, hence why I pinged, but we'll chat after standup, I guess, since I can't chat live very well right now.13:05
jamI did intend to discuss it13:05
jamjust ran out of time before meetings.13:05
facubatistajam, ah, perfect13:05
jamfacubatista, if I understand you correctly, you're happy with the behavior, but you feel it is more obvious to pass a boolean rather than having a stream that isn't None indicating that you want the new behavior?13:28
facubatistajam, it's more about which part is deciding what... if you call setuplogging and say debug=True, is fine to that setup function to decide a level and a stream; it's weird that the stream is decided outside, and that according to that stream debug is implied (this opens a lot of questions, what if the external caller want that stream but in info, etc)13:31
Chipacafacubatista: stand up13:31
jamfacubatista, so if it feels cleaner to you, go back to a boolean, and make the decisions internally again?14:18
jamI definitely prefer the env var to be evaluated in main(), but I can live with passing debug as a bool and having that decide to add a debug level log handler.14:20
facubatistajam, it feels cleaner to me to go back to the external caller saying "I want logs in debug mode" (with a bool), and the setup code internally deciding what "debug mode" means, for us here is DEBUG level and also send logs to stderr14:22
facubatistajam, the env var is perfect to be evaluated in main, yes14:22
facubatista(the main code may decide "go to debug mode" for several reasons in the future)14:22
facubatistaso... who may help me splitting this schema in N charms? https://is.gd/WqBWkK14:23
facubatistato explain it...14:23
facubatista1) everything is behind an apache, and two domains go to it14:24
facubatista2) if that domain is blog.t.c.a, the apache just serve some static files (which are prepared before)14:24
facubatista3) if that domain is comentarios.t.c.a, apache just proxies the request to a gunicorn serving other project14:25
facubatistaso, I attempted to split that structure in charms... AFAIU, I should have two units?14:26
facubatistaone with Apache serving local files... but I need a charm for the "blog" part, can I "mix it" with Apache?14:27
Chipacafacubatista: so. For docs. Get a new category on the discourse juju (charm-docs perhaps?)14:27
facubatistaother with the comments system, exposing a port, for which I'll add a relation to the first unit, for apache to talk14:27
Chipacafacubatista: we probably need to talk with somebody to get the category set up fwiw14:29
facubatistais this structure correct?14:29
facubatistaChipaca, we already have https://discourse.juju.is/c/docs/charming-docs14:31
facubatista"charming-docs"14:31
facubatistaChipaca, do we want a different section? reuse that one? for sure we could reuse a lot of text fromt there, or we'll start something from the scratch?14:33
Chipacafacubatista: 1 sec14:36
Chipacafacubatista: I think we need a separate category14:39
Chipacamaybe ops-charms?14:39
Chipacaops-charms-docs?14:39
Chipacadocops14:39
facubatistaChipaca, and start everything from scratch?14:39
Chipacafacubatista: we are14:40
facubatista"ops" is too obscure14:40
Chipacastarting from scratch i mean14:40
facubatistaYeap, but a lot from those texts are reusable, they tell a story, they talk about juju commands, etc14:40
facubatistawhich hooks exist and what they mean14:40
facubatistawe could start from current structure, discuss if we want it verbatim or which changes we should do, then start to fill the titles14:41
Chipacafacubatista: I'd rather start with a blank slate, in a separate category, and point to the ones that apply, than making things confusing to newcomers by having things that are all about reactive or layers or w/e14:47
facubatistaChipaca, I agree; my point is that let's do not grow doc structure organically, let's plan it, and we can use current structure as a source for that planning14:49
Chipacaer14:50
Chipacafacubatista: i don't understand what you mean14:50
Chipacamaybe i'm missing something14:50
Chipacafacubatista: you needed a place to write _a_ doc14:50
Chipacaso let's make that place14:51
Chipacait is still empty, missing all kinds of things, that yes they need planning and such14:51
facubatistaChipaca, yes; I'm also talking about what we want in a month14:51
facubatistaor a year14:51
facubatistabut yes, writing that one doc unblocks me14:51
Chipacafacubatista: so for now, write a doc there. It'll be weird, and disconnected from everything, but it's a place to write them14:51
facubatistaeso14:52
Chipacaexactly14:52
Chipacafacubatista: and it's a place to write them that won't further confuse things, and will let us move forward better once other things line up14:52
facubatistawe need a category, then... operator-charms-docs?14:52
Chipacacharm-operator-docs, or chods for short14:53
* Chipaca hides14:53
mthaddonChipaca: surely you mean "cods" :)14:55
ChipacaI dunno, there's something fishy in that one14:55
mthaddonI set them up, you knock 'em down...14:55
Chipacamthaddon: :-D14:57
facubatistawe can go with "ops-charm-docs" (which is just a token that will be used in the URLs), and "Operator Charms Docs" as the general title (which is what users will see)14:57
Chipacafacubatista: sgtm14:57
facubatistajam, you're admin in that Discourse, may you could create this new category for us? under general "Docs"? thanks!!15:00
jamfacubatista, I have the edit rights to be able to create a category (once I finally found the page that has a new category button), do we care about badge colors/etc ? or just leave it at defaults for now15:05
Chipacafwiw I don't mind (especially as you can change these later)15:09
jamhttps://discourse.juju.is/c/docs/ops-charm-docs15:10
facubatistajam, thanks!!15:15
facubatistajam, we should fix https://discourse.juju.is/t/about-the-operator-charm-docs-category/289315:15
Chipacajam: but not now. go away, now :-p15:22
* jam runs away15:23
* facubatista -> lunch15:26
* facubatista is back16:18
=== narindergupta is now known as narinderguptamac
Dmitrii-Shjam:  ty for `self._framework = framework.Framework(":memory:", self._charm_dir, self._meta, self._model)` in the harness code16:25
Dmitrii-Shmakes things so much simpler in writing independent test cases with components that have state16:25
* Chipaca steps away for a while17:12
Dmitrii-ShMade some progress on splitting out logic in the cockroachdb-operator PR19:36
Dmitrii-Shhttps://github.com/canonical/cockroachdb-operator/pull/1/commits/e6741a9a01432f19d445914a77ff3a65050f0bcd19:36
Dmitrii-ShThere are a couple of points to discuss related to injecting dependencies and https://github.com/canonical/operator/pull/196 needs to be merged to uncomment important lines in 3 test cases.19:36
Dmitrii-Shotherwise, I managed to cover the logic I had to test manually previously so that's good in my view19:37
Dmitrii-Sh *logging out for today"19:37
ChipacaDmitrii-Sh: awesome, thank you, and good night20:02
Dmitrii-ShChipaca: cheers o/20:02
Chipacafacubatista: ping?20:07
facubatistaChipaca, pong20:16
Chipacafacubatista: pm20:17
* facubatista eods, and eows! see you all on Monday!21:31
niemeyerfacubatista: Have a good rest21:31
facubatistaniemeyer, thanks!21:32
facubatistasame for you21:32
niemeyerThanks o/21:32
Chipacafacubatista: see you tuesday :D21:33
facubatistayes21:33
* facubatista reboots for a long due update21:33
ChipacaI too disappear, but only until tomorrow21:39
Chipaca👋21:39

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