Re: Charming with Resources

2016-10-17 Thread Matt Bruzek
Late to this thread, but I had to add a few things to this resource discussion. In my experience with charm development zero byte resources has been beneficial in three areas, charm development, third party charms, and testing. *Charm development*. When creating a new charm that uses resources, i

Re: Charming with Resources

2016-09-29 Thread Rick Harding
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 th

Re: Charming with Resources

2016-09-29 Thread Charles Butler
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 poi

Re: Charming with Resources

2016-09-29 Thread Stuart Bishop
On 29 September 2016 at 21:58, Charles Butler wrote: > TL;DR - would it be helpful to just initialize every resource stream, at > index 0, a zero byte resource? This aids users who are publishing charms > with copyrighted bins, or proprietary components. And give an immediately > publishable res

Re: Charming with Resources

2016-09-29 Thread Charles Butler
https://github.com/juju-solutions/kubernetes/blob/master-node-split/cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py#L70-L74 Seems like an applicable code-first way to solve this. Matt and I have been discussing extracting these common bits of code and contributing back to char

Re: Charming with Resources

2016-09-29 Thread Rick Harding
We didn't do an original 0byte resource because that's almost promised to fail. The thought was, in order to publish the charm into the store then you need some minimal resource that the charm will accept. If it's a django charm, a hello world application; if a file server, a demo image; etc. Just

Charming with Resources

2016-09-29 Thread Charles Butler
TL;DR - would it be helpful to just initialize every resource stream, at index 0, a zero byte resource? This aids users who are publishing charms with copyrighted bins, or proprietary components. And give an immediately publishable resource for streams. It occurred to me this week while we were