Charming with Resources

Rick Harding rick.harding at canonical.com
Thu Sep 29 18:08:06 UTC 2016


Correct, the original discussion was the charm behaving differently if the
fingerprint had changed of the resource on the remote end. However, running
resource-get deals with only fetching the new data if the fingerprint
changes and so there wasn't a big draw to the feature to that end.

Now, in this way, what you're asking is for some way to tell when there is
no resource? I guess I'm missing what the 0byte resource is giving you out
of the gates. The charm won't work, you want to fall back? And as soon as
the charm gets a non-0byte resource it's no longer useful.

I really feel like that if someone wants to publish something through the
store that they have to supply at least some bin that runs and outputs a
clear message to the user "got get the proper bins from here" instead of
just failing to deploy. Charm authors should be doing whatever is possible
to fail in a clear way, through the charm, so that users are guided on the
right path to moving forward. I don't think the charmstore or juju having
0byte defaults or "no resource found" is correct. It really needs to be the
charm taking that failure and putting context and a path for the user to
follow vs just "not found".

On Thu, Sep 29, 2016 at 11:48 AM Charles Butler <
charles.butler at canonical.com> wrote:

> We initially asked for resource fingerprints to be available before
> fetching so we could do something less expensive.
>
> That didn't make the 2.0 cut and was pushed back needing more forethought.
>
> This however is a good example of why it's a better option.
>
>
> And I had similar logic in etcd at one point. I'll be revisiting the etcd
> later to fold offlineability back into the charm using what you've proposed.
>
> If not resource : apt install
>
> --
> Juju Charmer
> Canonical Group Ltd.
> Ubuntu - Linux for human beings | www.ubuntu.com
> Juju - The fastest way to model your application | www.jujucharms.com
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20160929/3738c9aa/attachment.html>


More information about the Juju mailing list