<div dir="ltr">hmm.. there's three distinct threads here.<div><br></div><div>default-hook -> charms that do so symlink 0-100% -> to one hook.. in practice everything, sometimes minus install (as the hook infrastructure needs pkgs).. and most typically implemented via dispatch table.</div>
<div><br></div><div>something-changed -> completely orthogonal to either the default-hook merge request, and in practice full of exceptions, but useful as an optimization of event collapsing around charms capable of event coalescence</div>
<div><br></div><div>periodic async framework invoked -> metrics and health checks. afaics best practices  around these would be not invoking default-hook which is lifecycle event handler, while these are periodic poll, yes its possible but it conflates different roles.<br>
</div><div><br></div><div>cheers,</div><div>Kapil</div><div><br></div><div>also +1 to default-hook using JUJU_HOOK_NAME.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Aug 19, 2014 at 6:10 PM, Gustavo Niemeyer <span dir="ltr"><<a href="mailto:gustavo@niemeyer.net" target="_blank">gustavo@niemeyer.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On Tue, Aug 19, 2014 at 6:58 PM, Matthew Williams<br>
<<a href="mailto:matthew.williams@canonical.com">matthew.williams@canonical.com</a>> wrote:<br>
> Something to be mindful of is that we will shortly be implementing a new<br>
> hook for metering (likely called collect-metrics). This hook differs<br>
> slightly to the others in that it will be called periodically (e.g. once<br>
> every hour) with the intention of sending metrics for that unit to the state<br>
> server.<br>
><br>
> I'm not sure it changes any of the details in this feature or the pr - but I<br>
> thought you should be aware of it<br>
<br>
</div>Yeah, that's a good point. I'm wonder how reliable the use of<br>
default-hook will be, as it's supposed to run whenever any given hook<br>
doesn't exist, so charms using that feature should expect _any_ hook<br>
to be called there, even those they don't know about, or that don't<br>
even exist yet. The charms that symlink into a single hook seem to be<br>
symlinking a few things, not everything. It may well turn out that<br>
default-hook will lead to brittle charms.<br>
<br>
<br>
gustavo @ <a href="http://niemeyer.net" target="_blank">http://niemeyer.net</a><br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</div></div></blockquote></div><br></div>