<div dir="ltr">We're continuing the discussion about this in the charms.reactive issue tracker: <a href="https://github.com/juju-solutions/charms.reactive/issues/87">https://github.com/juju-solutions/charms.reactive/issues/87</a><div><br><div>Feel free to start hacking on this!</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-05 18:37 GMT+02:00 sheila miguez <span dir="ltr"><<a href="mailto:shekay@pobox.com" target="_blank">shekay@pobox.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'd like something like this.<div><br></div><div>The layer-snap's upgrade-hook cycle calls code[1] that checks for a non-zero resource, and then checks whether that resource has changed. I bet many charmers do this, and it would be useful to have a decorator that does it for us.</div><div><br></div><div><br></div><div>[1] <a href="https://github.com/stub42/layer-snap/blob/master/lib/charms/layer/snap.py#L53" target="_blank">https://github.com/stub42/<wbr>layer-snap/blob/master/lib/<wbr>charms/layer/snap.py#L53</a><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Sep 26, 2017 at 9:51 AM, James Beedy <span dir="ltr"><<a href="mailto:jamesbeedy@gmail.com" target="_blank">jamesbeedy@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">That totally does! This sounds like a great path forward that would allow us to eventually migrate away from having 'upgrade-charm' fire when a resource is attached, while maintaining backward compat for the charms that use it until its deprecated.<div><br></div><div>Well .... I didn't mean to just imply that things should change to this ^ way, but it seems sensible. Possibly we could have more of a conversation around this?</div><span class="m_-8124048349991777903HOEnZb"><font color="#888888"><div><br></div><div>~James</div><div><br></div><div><div><br></div></div></font></span></div><div class="m_-8124048349991777903HOEnZb"><div class="m_-8124048349991777903h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 26, 2017 at 12:41 AM, Merlijn Sebrechts <span dir="ltr"><<a href="mailto:merlijn.sebrechts@gmail.com" target="_blank">merlijn.sebrechts@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Does a `resource.changed` flag address your needs? That should be possible to implement in charms.reactive, I think.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-8124048349991777903m_8148088164275924573h5">2017-09-24 17:53 GMT+02:00 James Beedy <span dir="ltr"><<a href="mailto:jamesbeedy@gmail.com" target="_blank">jamesbeedy@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-8124048349991777903m_8148088164275924573h5">How do people feel about splitting the upgrade-charm hook into multiple hooks to facilitate better resource management?<br>
<br>
What I'm thinking would be super helpful would be to have the upgrade-charm hook still active for charm upgrades, and have separate hooks or flags that would indicate resource upgrades.<br>
<br>
I'm thinking something like:<br>
<br>
'juju attach myapp myresource=myresource.file'<br>
<br>
Would cause the 'upgrade-resource-myresource'  hook to become active on instances of 'myapp'.<br>
<br>
I feel that having this affinity from resource -> resource-upgrade-<resource-nam<wbr>e> hook would be a huge win for resource management.<br>
<br>
Thoughts?<br>
</div></div><span class="m_-8124048349991777903m_8148088164275924573m_5233648193630801144HOEnZb"><font color="#888888"><br>
<br>
<br><span class="m_-8124048349991777903m_8148088164275924573HOEnZb"><font color="#888888">
<br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/juju-dev</a><br>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br></div></div>--<br>
Juju mailing list<br>
<a href="mailto:Juju@lists.ubuntu.com" target="_blank">Juju@lists.ubuntu.com</a><span class=""><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/juju</a><br>
<br></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-8124048349991777903gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><a href="mailto:shekay@pobox.com" target="_blank">shekay@pobox.com</a></div></div>
</font></span></div>
</blockquote></div><br></div>