<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 14, 2016 at 12:50 PM Aaron Bentley <<a href="mailto:aaron.bentley@canonical.com">aaron.bentley@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Another use case is when you want to create a charm deploys Python<br>
code.  You want it to use "resources" instead of downloading<br>
dependencies from PyPI.<br>
<br>
1. The list of resources can change over time.  You don't want the<br>
charm to have to change every time the deployed software adds/removes<br>
a dependency.<br>
<br>
2. The version numbers are embedded in the filenames.  You don't want<br>
the charm to have to change ever time deployed software changes its<br>
version numbers.<br>
<br>
Yes, you can work around this with tarfiles, but why do we want to?<br>
It's a pain to build a tar file every time a single dependency<br>
changes.  It's easier to use S3 instead for a particular use case, but<br>
it doesn't solve the general case.<br></blockquote><div><br></div><div>I'd push back a little bit here though. We do this in a couple of python web applications. We keep a repo of 'download-cache' which is the current pypi .tar.gz and use that built into a single download-cache tarball for deliver in the charms. This would be one resource. The second resource would then be the actual python application. It would have the makefile, requirements.txt file, source code, etc. It would depend on the download-cache file being there and so with the two, you'd manage both the source code and the dependencies as two different resource files that are all updated individually from the actual charm itself. </div><div><br></div><div>So if a dependency is updated you can just update the source/download cache resources and not the charm. If the source code is updated and no deps are updated you just update the source code. </div><div><br></div><div>Again, there's room to improve the idea for the 'many resources' ideas, but the current work moves things forward into a nice direction reducing the need for fat charms and allowing some flexibility.</div><div><br></div></div></div>