Switch back to resources provided from the store

Hey all,

I have a charm in the charm store which has a binary resource attach. For development purposes I often overwrite the resource with another one for testing ala

$ juju attach mycharm resource=test.snap

However that disconnects the charm resource from the one provided from the store. Is there a way to switch the unit back to use the resource provided from the store? A juju upgrade-charm doesn’t do the trick.

Thanks!

regards,
Simon

1 Like

I looked into this and looking at the code it’s explicit in that it doesn’t update once the user goes with a custom file.

// Never override existing resources a user has already uploaded.

To support this we’d need a URL structure for a resource to be pointed back at a store based URL. Something like

juju upgrade-charm mycharm resource=cs:mycharm/resource-13

I’ve filed a bug around adding this at some point.

https://bugs.launchpad.net/juju/+bug/1862204

1 Like