On second though and after discussion with the team on today's standup,
some changes are needed before this can land. Please ping me to take a
look again when ready.
Instead of downloading AND extracting the charm, we got a general
agreement you should cache the charm archive, and then use something
like charm.zipOpen to read a single file from it, giving a path. You can
also simplify file path related operations, because the zip reader
allows you to range over all files, including their paths and do simple
matching urlFileArg == zipFile.Name(). Look into findArchiveRootDir and
fixPath inside the charms handler in apiserver.
On second though and after discussion with the team on today's standup,
some changes are needed before this can land. Please ping me to take a
look again when ready.
Instead of downloading AND extracting the charm, we got a general
agreement you should cache the charm archive, and then use something
like charm.zipOpen to read a single file from it, giving a path. You can
also simplify file path related operations, because the zip reader
allows you to range over all files, including their paths and do simple
matching urlFileArg == zipFile.Name(). Look into findArchiveRootDir and
fixPath inside the charms handler in apiserver.
https:/ /codereview. appspot. com/67750045/