Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
apiserver: Remove charm get cache #6302
Conversation
reedobrien
approved these changes
Sep 21, 2016
LGTM, but IANAGR.
apiserver tests pass on branch.
I don't see QA so I can't validate that.
| -// saves the corresponding zip archive to the given charmArchivePath. | ||
| -func (h *charmsHandler) downloadCharm(st *state.State, curl *charm.URL, charmArchivePath string) error { | ||
| + // Ensure the working directory exists. | ||
| + tmpDir := filepath.Join(h.dataDir, "charm-get-tmp") |
axw
Sep 21, 2016
Member
It would be great if we could stop using the temp-dir altogether. If we made some tweaks to the state/storage.Storage interface so that it returned an io.ReaderAt, we could do that.
mgo.GridFile does not implement io.ReaderAt, but it easily could from the looks of it. We could either add that upstream, or wrap the GridFile to seek&read (but would need to do so in a goroutine safe way).
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
mjs
added some commits
Sep 21, 2016
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
mjs commentedSep 21, 2016
•
Edited 1 time
-
mjs
Sep 22, 2016
The filesystem cache used when retrieving charms has been removed. It
was implemented when charms lived in a remote S3 bucket and is no longer
necessary now that charm live in MongoDB's GridFS store. This helps to
reduce disk space usage in the controllers and is one less thing that
needs cleaning up when models are removed.
See https://bugs.launchpad.net/juju/+bug/1608959
QA
Manually deployed charms and confirmed that old cache directory at
<datadir>/charm-get-cacheis no longer created and new<datadir>/charm-get-tmpdirectory is left empty.Manually created the old
<datadir>/charm-get-cachedirectory and populated it and then ran an upgrade. The directory was removed.