summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | Merge branch 'baserock/richardipsum/post_artifacts5'Richard Ipsum2014-04-151-3/+31
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: Lars Wirzenius Daniel Silverstone (on IRC) Sam Thursfield (v4 of patch) Richard Maw (on IRC)
| | | * | Add post request for /artifactsRichard Ipsum2014-04-151-3/+31
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | With this we can request the state of a set of artifacts in a single request. Artifacts are sent as a json array. We check whether each artifact is in the cache or not and send our findings back to the client as a json object.
| | * | Update copyright noticeRichard Ipsum2013-12-164-24/+3
| | | |
| | * | Merge branch 'baserock/tiagogomes/lighttpd'Tiago Gomes2013-09-121-3/+11
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: Pedro Alvarez Daniel Silverstone
| | | * | Allow to use flup as the backend server for bottle.Tiago Gomes2013-09-121-3/+11
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | lighttpd does not support WSGI, so we need to be able to run the server in FCGI mode. The flup package provides one. Running with the default bottle server is still useful for testing purposes.
| | * | Merge branch 'jonathan/fix-resolve-sha1-rebase'Jonathan Maw2013-06-041-3/+8
| | |\ \ | | | | | | | | | | | | | | | Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk
| | | * | Handle requesting a sha1 of a sha1Jonathan Maw2013-06-041-3/+8
| | |/ /
| | * | Merge remote-tracking branch ↵Lars Wirzenius2013-01-141-0/+53
| | |\ \ | | | | | | | | | | | | | | | 'origin/jannispohlmann/add-batch-sha1-and-file-queries'
| | | * | Handle batch sha1/file queries using POST requestsJannis Pohlmann2013-01-021-0/+53
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for resolving multiple refs into SHA1s and requesting multiple files at once, each using a single POST request. The (repo, ref) and (repo, ref, filename) parameters are passed to the POST requests as JSON dictionaries in a list. The response to both types of requests is a JSON list with the same dictionaries again, to which a "sha1" and "data" field are added, respectively. The file contents returned by "POST /1.0/files" requests are base64-encoded and need to be decoded at the receiver's end. This is because the contents may be binary or contain quotes and therefore cause JSON syntax errors.
| | * | Fix misspelled variable nameSam Thursfield2012-12-131-1/+1
| | | |
| | * | Log exceptions instead of ignoring themSam Thursfield2012-12-131-1/+1
| | | |
| | * | Use 'git rev-parse --verify' to resolve refsSam Thursfield2012-12-131-22/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'git show-ref' returns multiple results where there are partial matches for the given ref, which creates the possibility that we might resolve a ref incorrectly. 'git rev-list' is also overkill for verifying that a SHA1 is valid.
| | * | Fix missing argument to rev_list(), breaking resolve_ref for SHA1sJannis Pohlmann2012-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug has been present since the initial commit to the cache server. Due to the missing repo_dir argument to rev_list(), resolving SHA1s rather than symbolic refs via /1.0/sha1s fails. This feature, however, is absolutely required for morph to resolve petrified system branches.
| | * | Trim leading slashes from URI element during direct-mode. rs=richardmawDaniel Silverstone2012-09-251-1/+4
| | | |
| | * | Update /fetch API to latest definitionDaniel Silverstone2012-09-171-20/+51
| | | |
| | * | Merge branch 'danielsilverstone/updates'Daniel Silverstone2012-09-113-14/+137
| | |\ \
| | | * | Add facility to delete artifactsDaniel 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
| | /
| * | distbuild: allow daemons to bind to ephemeral portsRichard Maw2014-10-012-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can bind to an ephemeral port by passing 0 as the port number. To work out which port you actually got, you need to call getsockname(). To facilitate being able to spawn multiple copies of the daemons for testing environments, you can pass a -file option, which will make the daemon write which port it actually bound to. If this path is a fifo, reading from it in the spawner process will allow synchronisation of only spawning services that require that port to be ready after it is.
| * | Fix and integrate distbuild unit testsRichard Maw2014-10-014-128/+133
| | |
| * | Allow default split rules to be overridden in-codeRichard Maw2014-10-011-4/+4
| | | | | | | | | | | | | | | | | | This is needed for distbuild to deserialise based on the split rules on the node that did the graph calculation, rather than the node that does the building.
| * | Remove remaining test.as-root cmdtestsRichard Maw2014-10-018-455/+0
| | | | | | | | | | | | | | | | | | The repo-alias is indirectly tested by branch-from-image, and checking the --version is part of the release process, so we're not going to miss these tests.
| * | Remove overlap detection logicRichard Maw2014-10-0110-438/+0
| | | | | | | | | | | | | | | | | | | | | I've rarely needed to use it, and on those rare occasions, it would have been easy enough to calculate it. Let's get rid of this step, and save everyone some time in future.
| * | Remove run-in-artifact subcommandRichard Maw2014-10-016-117/+1
| | | | | | | | | | | | It's easy enough to deploy the image.
| * | Remove tarball image format tests from tests.as-rootRichard Maw2014-10-014-157/+0
| | | | | | | | | | | | | | | | | | | | | We're implicitly testing it in yarns already. Explicit tests would be better, but removing the old test makes it easier to get rid of build-mode: test.
| * | Move architecture existing test to yarnRichard Maw2014-10-015-37/+31
| | |
| * | Move the branch-from-image test to a yarnRichard Maw2014-10-015-59/+49
| | |
| * | Make show-dependencies not use build-mode: testRichard Maw2014-10-011-25/+7
| | |
| * | Stop tests.branching needing build-mode: testRichard Maw2014-10-013-5/+5
| | | | | | | | | | | | | | | | | | It doesn't do any actual building, so it doesn't matter that using build-mode: bootstrap everywhere means that it would end up with an empty system artifact.
| * | Remove unused cmdtestsRichard Maw2014-10-0114-780/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests.deploy is gone since we have yarn coverage instead. tests/setup had unnecessary setup in it, since the remaining tests require custom setup anyway. A bunch of tests were disabled anyway, so they're gone. Also, there was still code in ./check to run tests.merging, which have been gone for a while.
| * | Modify yarns to use test-shell instead of build-mode: testRichard Maw2014-10-014-167/+178
| | | | | | | | | | | | | | | When all the tests that use build-mode: test are gone, the build mode can be removed.
| * | Add test shell for use in staging area testsRichard Maw2014-10-011-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended to be statically linked, so it can be run in the staging area, without having to build a libc. You shouldn't generally statically link GLibc, because it dynamically links things like NSS modules or locale data, but we only need some very simple stuff, so we can get away with that. There's also potential licensing issues, as GLibc is LGPLv2, so distribution requires providing the ability to re-link against another library, but its use in the test-suite shouldn't count as distribution. There's a couple of commands, the only two needed by the yarn test suite are "copy files" which is like `cp -r . "$DESTDIR"`, and "false", which is for commands to deliberately fail.
* | | Merge branch 'sam/gbo-read-access'Sam Thursfield2014-10-071-2/+13
|\ \ \ | | | | | | | | | | | | | | | | Reviewed-By: Pedro Alvarez <pedro.alvarez@codethink.co.uk> Reviewed-By: Francisco Redondo Marchena <francisco.marchena@codethink.co.uk>
| * | | Never require SSH access to the Trove where baserock: content is hostedSam Thursfield2014-10-071-2/+13
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if the user included 'baserock' in their list of trove-ids, the keyed URL expansions in the repo-alias field would change such that reading from git.baserock.org required SSH access. This isn't good and in particular breaks Mason, which by default isn't set up with a Gitano account on the Trove that it reads from, and therefore doesn't have SSH access to that Trove. With this change, the trove-id field will not cause the default 'baserock:' and 'upstream:' prefixes to be overridden, so setting 'trove-id = baserock' in morph.conf will not Morph's behaviour to change.
* | | Merge branch 'baserock/pedroalvarez/fix-xfer-hole'Pedro Alvarez2014-10-021-2/+8
|\ \ \ | | | | | | | | | | | | | | | | Reviewed-by: Pedro Alvarez Reviewed-by: Paul Sherwood