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

axinohi07:45
axinois it expected that my very basic charm weights ~10MB ?07:45
xavpaicecrikey what did you put in there, a video instruction on installation?08:03
xavpaicejust checked one or two of my operator charms, yeah they really are that big08:25
xavpaicegit submodule and all that - though the charmcraft setup might change that quite a bit08:25
axinoI think it was ~300k a few days ago08:53
axinoand was deploying fine08:53
axinoI just removed the venv and it's back to ~300k09:50
axinoand it deploys fine09:50
Chipacaaxino: 'sup09:51
axinoChipaca: my charm was ~10M big because it included "venv" and a full python3.6 distro09:51
Chipacaaxino: ! how09:52
Chipacaaxino: steps to repro plz?09:52
axinoChipaca: that's what happens if you follow README.md09:52
axinofrom charmcraft init09:52
axino(I'm developping on a 18.04 machine btw)09:52
Chipacaaxino: with charmcraf from beta, or edge?09:53
axinoChipaca: edge09:53
axinoChipaca: I ran "charmcraft init" on Aug 17 though09:54
axinoif that helps09:54
Chipacano, yes, totally, i can see what's happening now09:54
Chipacaaxino: this is more of the issue we were discussing last night09:54
Chipacaaxino: two workarounds to unblock you while we address it09:54
axinoChipaca: I added "venv" to .jujuignore and it seems to work09:55
Chipacaaxino: 1. add the venv to .jujuignore09:55
axino:)09:55
Chipacayeah :-)09:55
Chipacaaxino: 2. was to create the venv outside of the project09:55
Chipacaaxino: 3. was to run charmcraft from beta instead of edge09:55
ChipacaI suspect the fix is just to add "add venv to jujuignore" to the generated README, because "include everything not in jujuignore" has exactly this consequence, and it's what people requested09:57
axinoChipaca: or just add venv to the jujuignore generated by charmcraft init ?09:58
Chipacait already has /env09:58
Chipacawhich might be a tyop09:58
axinoChipaca: ah09:58
Chipacaso, yeah09:58
axinoChipaca: because I saw /env and was wondering why it was there09:58
Chipacayeah i'll push a fix that just env->venv in README.md.j210:00
Chipacawhat we were discussing last night was venv in the generated charm, which isn't a venv at all10:01
Chipacaso not really related to this10:01
bthomasChipaca: Are you free anytime today for a 1:1 ?10:02
Chipacabthomas: sure. in 30?10:02
bthomasthanks. will wait for you ping10:03
Chipacabthomas: belated ping10:40
Chipacabthomas: standup meet10:41
bthomasChipaca: yep going there now10:41
ChipacaI HELPED!10:49
* Chipaca celebrates10:49
bthomasYep : thank you Chipaca10:57
bthomasops-lib-k8s is not in pypi so I guess I have to add it as git repo to requirements.txt10:58
facubatista¡Muy buenos días a todos!10:59
Chipacabthomas: correct10:59
Chipacafacubatista: god  morning!10:59
bthomasMorning facubatista10:59
Chipacahah!10:59
bthomasI was faster but didn't get the font right11:00
Chipacafacubatista: you have been blessed by the gods of $RANDOM11:00
* bthomas hail facubatista 11:00
facubatistaChipaca, that's me, hello11:00
facubatistahola bthomas11:00
Chipacahow 'eval printf "o%.0s" {2..$((RANDOM/512))}' can result in 'god' requires some thought11:01
facubatistaChipaca, carrot time11:02
* Chipaca goes11:02
bthomasI do not see logs from my charm in juju debug-log. Will it make juju unresponsive if I set juju model-config update-status-hook-interval to a few seconds ?12:11
bthomasAlso "eval printf "o%.0s" {2..1}" produces oo and {2..0} produces ooo12:14
mupIssue operator#387 opened: passing k8s_resources to pod.set_spec() requires a dict with a single key "kubernetesResources" <Created by axinojolais> <https://github.com/canonical/operator/issues/387>12:39
Chipacabthomas: update-status-hook-interval is documented as having a minimum of 1m13:05
Chipacafacubatista: i'm back fwiw13:07
facubatistaChipaca, let's do it13:08
facubatistaChipaca, same than before?13:09
Chipacafacubatista: actually, give me a minute to get a quick coffee thing13:10
facubatistaChipaca, ack, I'm there13:10
bthomasChipaca: I am hosed then, am i not ? How do I debug why both original and refactored charms do not progress beyond waiting for pod to be setup ?13:11
Chipacabthomas: are you doing a pod-set-spec and then waiting, in the same hook, for the pod to come up?13:12
Chipacafacubatista: did you drop?13:13
bthomasChipaca: yes that looks to be the case .13:13
bthomasI have not changed this from the original charm.13:13
Chipacabthomas: that's not going to work; pod-set-spec is done once the hook finishes successfully13:14
facubatistaChipaca, nop, https://meet.google.com/eyx-jtan-dac13:14
* justinclark awake13:27
justinclarkQuestion Chipaca/facubatista: I'm working on the GrafanaBase charm that has all the shared functionality between k8s and non-k8s and I think have an HTTP interface that works, but I want to get feedback in case I'm doing something silly.14:03
justinclarkHere's the interface_http.py file: https://github.com/justinmclark/grafana-charm-base/blob/grafana-base/src/interface_http.py14:03
facubatistajustinclark, let's talk in the standup? I'm in a meeting and have another one before that (I mean, standup is the earliest slot I may have to provide you feedback)14:04
justinclarkSounds great. No rush. Thanks facubatista14:05
deejhttps://code.launchpad.net/~deej/charm-k8s-openldap/+git/openldap/+merge/389606 <- Chipaca facubatista for our call in a few, though 90% of that is Docker stuff14:24
Chipacajustinclark: was your review of charmcraft#124 a +1?14:30
mupPR charmcraft#124: cope with bionic's slightly broken pip3 command <Created by chipaca> <https://github.com/canonical/charmcraft/pull/124>14:30
justinclarkOh yes sorry about that Chipaca. Just gave it the official +114:31
deejChipaca: https://code.launchpad.net/~deej/charm-k8s-openldap/+git/openldap/+merge/38934514:36
deejChipaca: https://code.launchpad.net/~deej/charm-k8s-openldap/+git/openldap/+merge/38960614:47
deejLine 285 of that diff, I was hoping for a cleaner way to do that14:47
deejThough if I go with facubatista's suggestion of storing a dict in the state and unpacking it when I do the pod configuration, that solves that issue for me14:48
deejSo I guess it's sort of a matter of best practices for how to store data structures in state14:48
Chipacadeej: so a dict works, but if you'd rather use a class because db.user is better than db['user'], you can do one of two things: write an actual class with the appropriate methods, or, use a namedtuple and explicitly build it from state14:51
mthaddonChipaca, facubatista: have ~charmcrafters as a requested reviewer for https://code.launchpad.net/~axino/charm-k8s-gunicorn/+git/charm-k8s-gunicorn/+merge/389554 fwiw (sorry for so many at once)14:51
deejChipaca: Nah, a dict totally works, I'm not fussy14:51
* Chipaca marks them Disapprove and moves on14:52
* mthaddon cries :(14:54
Chipacadeej: OTOH WRT that line in the diff itself, there isn't currently a better way but I don't see why we couldn't have one14:54
ChipacaI mean, given set_default, an update makes sense14:54
Chipacai14:54
Chipacai'll file a bug14:54
deejta14:55
deejAwesome14:55
Chipacadeej: #38815:00
mupIssue #388: give BoundStoreState an update method to set multiple things <Created by chipaca> <https://github.com/canonical/operator/issues/388>15:00
mupIssue operator#388 opened: give BoundStoreState an update method to set multiple things <Created by chipaca> <https://github.com/canonical/operator/issues/388>15:00
Chipacafacubatista: did you get to see that library with super interesting progress bars i shared a while ago?15:08
facubatistaChipaca, I don't remember which one... I know about this https://pypi.org/project/progress/ and https://tqdm.github.io/15:09
Chipacafacubatista: https://github.com/willmcgugan/rich15:11
Chipacafacubatista: it's rather big, but of interest to us are the tables and the progress bar i think15:13
Chipacabut it might be too much also :)15:13
facubatistaChipaca, we can revisit it when we get the order to show help messages with markdown format15:25
Chipacafacubatista: FINE15:26
Chipacafacubatista: :-p15:26
facubatista:)15:26
Chipacahave i mentioned how weird python is in windows15:29
Chipacathe actual weirdest thing is how much stuff just works15:31
Chipacathe second thing is the stuff that doesn't :)15:31
mthaddonso basically everything is weird15:31
facubatistaChipaca, meeting15:32
Chipacaalready?15:32
Chipacamthaddon: oh yeah. and slow.15:32
Chipacabthomas: 1 min and then we meet15:54
bthomasThanks Chipaca15:54
bthomasChipaca: we can't use the standup meeting url so https://meet.google.com/mhc-svks-wnx15:55
Chipacajustinclark: i'm not sure i followed what you meant in #378 but the fix addresses the issue you point out16:14
mupIssue #378: Docstyle for `ops` is Google doc style but parsed with Sphinx <Created by justinmclark> <https://github.com/canonical/operator/issues/378>16:14
bthomasThanks for you time Chipaca : I am also going to explore adding OCI resource feature to opslib, after looking at available implementations. If you have a preferred approach in this regard, do mention it.16:15
Chipacabthomas: if you arrange it into opslib directly in your charm, we can look at pulling it out next week16:16
bthomaswill do16:16
Chipacabthomas: my main concerns are wrt who the original author is, and ensuring when we do split it we bring authorage information along so we're not stealing without crediting it :)16:17
Chipacabthomas: also I don't think it has any tests16:17
Chipacaso that's a problem16:17
bthomasUnderstood. That is a fair. I like fair :).16:17
Chipacabthomas: ultimately if it's more than a half hour of shunting code around just leave it and i can pick it up next week16:18
bthomasOk. It proabably is for me right now.16:19
Chipacathat's also fair :)16:20
bthomas:)16:21
Chipacafacubatista: ping16:32
facubatistaChipaca, meeting16:32
Chipacafacubatista: one I should be in?16:32
facubatistaChipaca, don't know, nvidia one16:32
Chipacafacubatista: can you run charmcraft from your commands-long-help branch? i have a question for you16:33
facubatistarun it how?16:33
Chipacafacubatista: to see the help for build and for login16:34
facubatistaChipaca, https://pastebin.canonical.com/p/7WnxW75jBt/16:36
Chipacafacubatista: so, do you want the overview indented as in build, or not as in login?16:36
Chipacai like it slightly indented as the build one but noted you use dedent elsewhere16:37
justinclarkfacubatista it looks like others have had to check if event.unit is None. e.g. https://github.com/canonical/operator/issues/175#issuecomment-59704250416:43
facubatistaChipaca, ah, got it! No identation, please16:48
Chipacafacubatista: wrt version, i think we should drop "Version: " from its output16:54
facubatistaChipaca, want me to include that change in this branch:16:59
facubatista?16:59
Chipacafacubatista: i'm editing them as you requested16:59
facubatista(in the long-commands-help, I mean)16:59
Chipacaoh wait you mean Version:?16:59
Chipacacould be:)16:59
Chipacai'm struggling with some of these texts but we can revisit, right?17:02
Chipacafacubatista: pushed, please let me know what you think17:18
* facubatista checks17:18
Chipacaand i bungled something up, pushing a fix17:20
facubatistaChipaca, I see it now (it was in my original text, I think): if we quote "latest", shouldn't we also quote edge, beta, etc? or unquote them all?17:22
facubatistaChipaca, also, need to update version's test17:25
Chipacapsh17:25
Chipacafixing17:25
facubatistaChipaca, beyond those two details, I like it17:25
facubatistaso we need just a third eye on the branch17:25
Chipacafacubatista: ꙮ17:27
facubatistaja17:28
Chipacafacubatista: wrt the quotes, probably, and we should probably use the right quotes also17:30
Chipacafacubatista: in this case the “right” quotes are ‘these’17:31
facubatistaChipaca, as you wish, I'm a quote impaired person17:35
Chipacafacubatista: http://www.eng-lang.co.uk/ogs.htm17:37
Chipacafacubatista: probably17:37
Chipacafacubatista: «Use quotation marks to enclose an unfamiliar word or phrase, or one to be used in a technical sense.  The effect is similar to that of highlighting the term through italics»17:38
ChipacaANYway17:38
ChipacaEOW for me babyy17:38
facubatistayes, that's quoting17:39
* Chipaca sets the room on fire and runs away17:39
facubatistaI use " for that17:39
facubatistaI don't like the assymetric ones17:39
facubatistaand I almost hate the "compressed double greater/less than"17:39
justinclarkI noticed the reactive, non-k8s Grafana charm [1] is using snap/apt to install Grafana. Is this preferred to using a container image (for non-k8s charms)? I'm sure this partly depends on the app itself but I didn't know if there are best practices for charmers.17:54
justinclark[1] https://git.launchpad.net/charm-grafana/tree/src/reactive/grafana.py17:54
justinclarkWe'd have to setup persistent storage if using the grafana docker container but that's easy enough to do.17:56
justinclarkI suppose docker would also need to be running on the unit which could be a hassle (but I don't know that for sure)17:56
facubatistajustinclark, don't know either18:07
facubatistajustinclark, there are significant versions difference between snap's and repo's?18:07
justinclarkIt doesn't look like repo vs. snap have significant version differences18:18
justinclarkfacubatista ^18:18
facubatistajustinclark, which is the benefit of using a container image over "snap install grafana"?18:20
justinclarkfacubatista, Since k8s requires a container image for the pod spec, I figured I'd see if using that same container image is just as easy to use in the non-k8s charm. Again, this is just me trying to find the overlap between k8s and non-k8s charms.18:23
justinclarkSnap does seem easier though18:23
drewn3sshonestly, the history is that all lma/infra charms were moved to using snaps for A) dogfooding, and B) ease of iteration and installation and auto-updating nature of snaps.18:27
drewn3ssit's lighter from an operational perspective18:27
drewn3ssbut if youre moving into a containerized world, and can build processes around managing container images like we have for managing snapcraft files in upstream projects, I don't see why a move to containers instead of snaps would be a problem.18:28
drewn3ssin fact, the cdk-addons uses the grafana/influx container image18:30
drewn3ssbut that product lacks the persistent volume storage for upgradability and node failover management18:30
justinclarkAh okay that makes sense drewn3ss. Whatever will make things easier people down the line is what I'll end up doing. Right now I'm experimenting so I won't make decisions that will lock anyone into a particular way of doing things.18:35
mupPR operator#389 opened: minor docs fix <Created by justinmclark> <https://github.com/canonical/operator/pull/389>18:54

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