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

=== max__ is now known as Guest26373
=== narindergupta is now known as narinderguptamac
jammorning all05:53
niemeyerHello charmers07:54
Chipacagoood morning!08:04
niemeyerChipaca: Hiya!08:12
Chipacamy laptop is back at being stuck at 800MHz :-(08:15
Chipacamight have to spend some time talking with tech support08:15
niemeyerMight be a safety mechanism so you're not going too fast08:15
niemeyerstub: Good question about the place to put the "lib".. once they go out, the idea is to have a module directory under ops.lib09:48
niemeyerstub: My original idea when we discussed was to have it under the charm itself, so that there would be a local "lib" namespace.. but there's an issue with that plan09:49
niemeyerWe need to be able to have multiple charms of the same author using that same library, precisely so that it becomes easier to reuse and to move into ops.lib once it evolves enough09:49
stubAnd 'from lib import pgsql' would be importing lib/lib/pgsql/__init__.py ?09:54
stubI'm mostly interested in getting the namespace right at my end.09:54
niemeyerstub: Right, it was a good question.. my original idea was src/lib/pgsql, but that's not good enough09:57
niemeyerstub: lib/lib isn't great either09:57
niemeyerstub: Not naming spacing pgsql isn't good either, as the top-level namespace is busy and we'll often be implementing libraries to integrate existing things in charms09:58
niemeyer*namespacing09:58
stubIdeally without turning hooks/install into a mess of PYTHONPATH manipulation hacks10:01
niemeyerYeah, we shouldn't need any further manipulation..10:02
niemeyerWe already have src for local, and lib for external, so we should be good10:02
Chipacajam: you froze10:32
Chipacaor my network died10:32
jamChipaca, its probably me10:33
niemeyerLunch, biab11:05
facubatistaMuy buenos días a todos!11:07
jammorning facubatista11:16
facubatistahola jam11:16
Chipacawhoops, laptop lost power while i was having lunch11:27
jamChipaca, I was wondering where you went :)11:28
* Chipaca heads for the hills11:28
facubatistaChipaca, jam, we need to decide *how* we will support a dispatch entrypoint; this doc talks about it as "a new thing" but does not describes any migration: https://docs.google.com/document/d/1RHrOMbqsXz9qwk_3sHJ7AJOdlh-Mb-TkFUAtbXb37Og/edit#heading=h.df280vskamcl11:28
facubatistaChipaca, jam, so, what happens if both dispatch and classic hooks coexist?11:29
jamfacubatista, yeah, I'm planning on adding a bit to that doc. I think it evolved and covers what Juju needed to do, but part of why that plan was ok was because of the plan for the framework. I'm working on that now.11:29
jamI think we had a good plan, just need to get it written down.11:29
facubatistajam, ack11:29
facubatistajam, please let me know when that's done, then, thanks!11:30
facubatistaChipaca, we need this ^ before continuing with #221, right?11:32
mup_PR #221: osp, test: support dispatch <Created by chipaca> <https://github.com/canonical/operator/pull/221>11:32
Chipacafacubatista: yep11:33
Chipacawell, more or less :)11:33
Chipacai already know the gist of it so i can move forward11:33
Chipacabut i've got plenty other things on my plate so i'll leave it be for now11:33
jamfacubatista, is it worth talking about all the ways and why we chose not to do the alternatives, or just focus on the expected path?11:34
facubatistajam, it totally worths it, otherwise you may keep answering that to everybody who read the docs -- better to write it just once11:34
jamChipaca, I just remembered one of the other concerns we should keep in mind.11:35
jamnamely, hooks/install => src/charm.py for compatibility, but also dispatch => src/charm.py. We don't want dispatch getting called to cause install to get called and double-handle every event (or worse, infinitely recurse. :)11:36
facubatistajam, we can see that hooks/install is present *and not* a symlink to ourselves11:38
facubatistas/see/check/11:38
jamfacubatista, indeed. just something we need to remember to do11:38
facubatistajam, don't trust our memory! that's the kind of detail that should be written down11:39
jamyeah, I'll be adding it to the doc.11:39
=== mup__ is now known as mup_
facubatistajuju deploys my charm in an unit; which directory should I work with, from the charm, to put "local files"? /var/lib?11:51
facubatistawhere is the best way to ask these questions? ^11:51
facubatistas/way/place/11:51
jamfacubatista, local to the charm, local to the app? many people reuse $PWD (which is /var/lib/juju/agents/<unit-name>/charm) but that is usually considered non-ideal (it leads to dirty charm directories and upgrades/etc also touch that dire)11:52
facubatistajam, local to the app11:53
facubatistajam, I want to put a file there that will be served later11:53
* facubatista tries to os.mkdir("/var/lib/mything")11:54
jamfacubatista, local to the app depends on the app itself, right? eg Apache likes '/www'11:54
facubatistajam, but my charm doesn't run in the same unit than apache, right?11:54
facubatistajam, I'm *exactly* blocked in that point11:54
jamfacubatista, it depends how you deploy it.11:54
facubatistajam, do you know how to do it?11:55
facubatistathis needs to be a subordinate charm somehow?11:55
jamfacubatista, if you need to be on every unit of another app, the usual recommended way is to be a 'subordinate'11:55
jamexactly11:55
jamyou can always have a bundle that colocates 2 different applications on the same machines, but if you're saying "I want to populate data for Apache to serve", that sounds like a subordinate.11:56
jamsubordinates explicitly don't have their own 'number of units', they are strictly a 'place a unit of this everywhere you place a unit of that'11:56
facubatistammmm... actually... let me see something else first11:56
facubatistajam, thanks!11:57
facubatistajam, Chipaca, niemeyer, meeting, https://meet.google.com/fqw-mdqc-dsf12:00
=== __chip__ is now known as Chipaca
Chipacaok, need to reboot14:41
niemeyerMe too.. that is, *I* need to reboot, not the laptop14:54
* facubatista -> lunch15:23
Chipacasneaking in for a bit while writing yet another usb image :-/15:42
* facubatista is back15:59
* Chipaca booted into windows, was terrified, and ran away15:59
facubatistaChipaca, are you ok for the meeting, or shall we pospone it?15:59
Chipacafacubatista: i'll be there in 15 seconds16:00
Chipacacame back for it16:00
niemeyerModule namespaces are not my friends16:01
niemeyerAt least not as I was trying it out16:01
niemeyerCan't get ops.beta to be a namespace while we have content in ops16:02
Chipacaok, off to do the Lesser Scary Thing16:27
niemeyer# XXX Is this the right thing for subpackages like zope.app?16:44
niemeyerNot a great comment to find in the implementation of namespaces.. :)16:44
facubatistajejeje17:11
niemeyerOkay, got something that starts to look promising...17:35
mup_Issue # closed: operator#98, operator#113, operator#122, operator#123, operator#156, operator#158, operator#161, operator#165, operator#166, operator#169, operator#171, operator#172, operator#174, operator#175, operator#178, operator#179, operator#180, operator#185, operator#186, operator#187,17:36
mup_operator#188, operator#189, operator#198, operator#205, operator#206, operator#208, operator#211, operator#214, operator#215, operator#219, operator#220, operator#222, operator#22317:36
mup_PR # closed: operator#190, operator#196, operator#203, operator#212, operator#218, operator#22117:36
mup_Issue # opened: operator#98, operator#113, operator#122, operator#123, operator#156, operator#158, operator#161, operator#165, operator#166, operator#169, operator#171, operator#172, operator#174, operator#175, operator#178, operator#179, operator#180, operator#185, operator#186, operator#187,17:37
mup_operator#188, operator#189, operator#198, operator#205, operator#206, operator#208, operator#211, operator#214, operator#215, operator#219, operator#220, operator#222, operator#22317:37
mup_PR # opened: operator#190, operator#196, operator#203, operator#212, operator#218, operator#22117:37
niemeyerHmm.. mup seems to be taking a network error as a valid document17:37
niemeyerNeed to look into it17:37
niemeyerfacubatista: When you have a moment, would like to have a quick chat about this:17:38
niemeyerhttps://paste.ubuntu.com/p/cHP2gq5MkK/17:38
facubatistaniemeyer, I was about to get a cup of tea; let's do it in 10'?17:39
niemeyer+117:39
niemeyerI mean.. yes, 10' :)17:39
facubatistaok, in 11' :p17:39
facubatistayes, jajaaj17:39
facubatistaniemeyer, https://meet.google.com/veq-yfqm-kdk ?17:46
niemeyerfacubatista: omw17:48
* facubatista eods20:48

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