summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add facility to delete artifactsdanielsilverstone/updatesDaniel Silverstone2012-09-071-0/+13
| | | | | | | | | | | | | | | | | | | In order to allow the artifact cache to be cleaned up, this patch allows for a /delete method which can remove artifacts from the cache. It takes the following arguments: artifact=artifactname The artifact will be deleted and a JSON object returned in the form: { "status": errno, "reason": strerror } Where errno is zero on success, 1 on EPERM, 2 on ENOENT etc. and reason is the strerror of the errno, in case the architectures differ between caller and cache.
* Support for fetching artifacts to the cacheDaniel Silverstone2012-09-071-9/+41
| | | | | | | | | | | | | | | | | | | | | | | Rather than pushing artifacts to the cache, this method allows the caller to specify a host and artifact which the cache server will then fetch into its local cache. It takes the following arguments: host=hostname:port artifact=artifactname This is transformed into a fetch to: http://hostname:port/artifacts?basename=artifactname Which is then fetched into the cache under the given name. The return from this is a JSON object of the form: { "filename": artifactname, "size": NBYTES_SIZE_OF_FILE, "used": NBYTES_DISK_SPACE_USED }
* Add a /list methodDaniel Silverstone2012-09-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | When --enable-writes is set, we provide a /list target which produces a JSON dictionary of information about the state of the artifact cache. The dictionary is of the form: { "freespace": NBYTES_OF_SPACE, "files": { "artifact-filename": { "atime": ATIME_AS_NUMBER, "size": NBYTES_SIZE_OF_FILE, "used": NBYTES_USED_ON_DISK }, ... } } This allows a controller to decide which artifacts have not been requested in some time and also how big artifacts are, not only in terms of their 'byte' size, but also the space they consume on disk. System images in particular may differ in this respect since they should be sparsely stored.
* Add ability to have 'writable' cache servers.Daniel Silverstone2012-09-071-0/+19
| | | | | | | Since we need to be able to update the cache from builders, this patch introduces a --enable-writes argument to morph-cache-server and also adds a @writable decorator to the class ready for marking particular paths which are only available when --enable-writes is set.
* Support running on a different port from 8080Daniel Silverstone2012-09-071-1/+6
| | | | | In order to allow multiple morph-cache-server instances to run on a single system, we need to support running on different ports.
* Return tree SHA1 when looking for ref resolution.Daniel Silverstone2012-09-072-4/+14
| | | | | | | | Morph now expects the tree SHA1 in addition when resolving references using the cache server. This is to better facilitate correct cache key computation since commits can be made which have no tree changes and thus nothing to usefully affect the build. (For example the morph branch and build features)
* A direct-mode for git cache accessDaniel Silverstone2012-09-072-9/+30
| | | | | | | Direct-mode, when enabled, causes morph-cache-server to assume a more Trove-like structure for the repositories, rather than the morph-cache structure which it was originally written for. This means that for the workers, we can use the original code and for Trove, the direct mode.
* Add a .gitignore to ignore *.pycDaniel Silverstone2012-09-071-0/+1
| | | | | To reduce the noise when I run 'git status' this gitignore will mean that git won't notify me of repocache.pyc and __init__.pyc
* Revert "Use the desired artifact filename as the download filename."Jannis Pohlmann2012-05-011-1/+0
| | | | This reverts commit f1fba299bd07510346082ef985ef08a494dca9d9.
* Add /trees which serves the contents of a git tree using ls-tree.Jannis Pohlmann2012-04-202-0/+45
| | | | | | | | | | | | | | | | | | /trees queries take repo URI, a SHA1 ref and an optional path parameter. The result is a JSON dictionary of the form { "repo": "<repo URI>", "ref": "<SHA1 ref>", "tree": { "filename1": { "mode": "100644", "kind": "blob", "sha1": "FOOBARBAZ" }, ... } }
* Use the desired artifact filename as the download filename.Jannis Pohlmann2012-04-181-0/+1
|
* Add support for /artifacts.Jannis Pohlmann2012-04-181-0/+17
|
* Fix various small issues preventing bundles from working.Jannis Pohlmann2012-04-182-3/+6
|
* Add untested support for bundles.Jannis Pohlmann2012-04-182-6/+25
|
* Use "Cache-Control: no-cache" to avoid caching of /sha1s results.Jannis Pohlmann2012-04-181-0/+1
| | | | | | Resolving a ref may result in a different SHA1 between any two requests, so we simply should never allow the results to be cached by an HTTP cache.
* Raise a RepositoryNotFoundError if a repo does not exist in the cache.Jannis Pohlmann2012-04-182-2/+12
|
* Initial import implementing /files and /sha1s.Jannis Pohlmann2012-04-175-0/+259