upgrade-charm hook

Merlijn Sebrechts merlijn.sebrechts at gmail.com
Wed Oct 11 15:06:11 UTC 2017


We're continuing the discussion about this in the charms.reactive issue
tracker: https://github.com/juju-solutions/charms.reactive/issues/87

Feel free to start hacking on this!

2017-10-05 18:37 GMT+02:00 sheila miguez <shekay at pobox.com>:

> I'd like something like this.
>
> 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.
>
>
> [1] https://github.com/stub42/layer-snap/blob/master/lib/
> charms/layer/snap.py#L53
>
>
>
>
> On Tue, Sep 26, 2017 at 9:51 AM, James Beedy <jamesbeedy at gmail.com> wrote:
>
>> 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.
>>
>> 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?
>>
>> ~James
>>
>>
>>
>> On Tue, Sep 26, 2017 at 12:41 AM, Merlijn Sebrechts <
>> merlijn.sebrechts at gmail.com> wrote:
>>
>>> Does a `resource.changed` flag address your needs? That should be
>>> possible to implement in charms.reactive, I think.
>>>
>>> 2017-09-24 17:53 GMT+02:00 James Beedy <jamesbeedy at gmail.com>:
>>>
>>>> How do people feel about splitting the upgrade-charm hook into multiple
>>>> hooks to facilitate better resource management?
>>>>
>>>> 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.
>>>>
>>>> I'm thinking something like:
>>>>
>>>> 'juju attach myapp myresource=myresource.file'
>>>>
>>>> Would cause the 'upgrade-resource-myresource'  hook to become active on
>>>> instances of 'myapp'.
>>>>
>>>> I feel that having this affinity from resource ->
>>>> resource-upgrade-<resource-name> hook would be a huge win for resource
>>>> management.
>>>>
>>>> Thoughts?
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Juju-dev mailing list
>>>> Juju-dev at lists.ubuntu.com
>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>> an/listinfo/juju-dev
>>>>
>>>
>>>
>>
>> --
>> Juju mailing list
>> Juju at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/juju
>>
>>
>
>
> --
> shekay at pobox.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20171011/d2b5af8e/attachment.html>


More information about the Juju-dev mailing list