Use store-api for binary cache instantiation
[?]
May 12, 2016, 8:15 AM
PDI5YPBYHMU4EQM3D45JEUYI4PBU5KGDIWK5O5YEOCM6R3IEAXUQCDependencies
- [2]
E5YNZACSFix build - [3]
NJJ7H64SVery basic multi-threaded queue runner - [4]
GTUZLZRHAdd an S3-backed binary cache store - [5]
MHVIT4JYSplit hydra-queue-runner.cc more - [6]
K5G5GZY7Guard against concurrent invocations of hydra-queue-runner - [7]
O64P4XJSKeep per-machine stats - [8]
PLOZBRTRAdd command ‘hydra-queue-runner --status’ to show current status - [9]
ENXUSMSVMake concurrency more robust - [10]
SOB276BAKeep some statistics for the binary cache stores - [11]
N2NKSKHSRefactor local binary cache code into a subclass - [12]
B2L4T3X6Sync with Nix - [13]
V2UCCYN3hydra-queue-runner: Get store mode configuration from hydra.conf - [14]
GJV2J5HXPool local store connections - [15]
DXFMYCNWFix build - [*]
24BMQDZAStart of single-process hydra-queue-runner
Change contents
- replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 10
#include "s3-binary-cache-store.hh"#include "store-api.hh" - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 796
auto storeMode = hydraConfig["store_mode"]; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 799
if (storeMode == "direct" || storeMode == "") {if (hydraConfig["store_uri"] == "") { - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 801[3.894]→[3.696:906](∅→∅),[3.696]→[3.696:906](∅→∅),[3.906]→[2.0:48](∅→∅),[2.48]→[3.895:977](∅→∅),[3.960]→[3.895:977](∅→∅),[3.1034]→[3.1134:1152](∅→∅),[3.1134]→[3.1134:1152](∅→∅)
}else if (storeMode == "local-binary-cache") {auto dir = hydraConfig["binary_cache_dir"];if (dir == "")throw Error("you must set ‘binary_cache_dir’ in hydra.conf");_destStore = openLocalBinaryCacheStore(_localStore,hydraConfig["binary_cache_secret_key_file"],dir);} else {_destStore = openStoreAt(hydraConfig["store_uri"]); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 805[3.1250]→[3.1250:1527](∅→∅),[3.1527]→[3.1035:1060](∅→∅),[3.1060]→[3.1583:1640](∅→∅),[3.1583]→[3.1583:1640](∅→∅),[3.1697]→[3.1697:1816](∅→∅),[3.1816]→[3.643:644](∅→∅),[3.4896]→[3.643:644](∅→∅),[3.643]→[3.643:644](∅→∅)
else if (storeMode == "s3-binary-cache") {auto bucketName = hydraConfig["binary_cache_s3_bucket"];if (bucketName == "")throw Error("you must set ‘binary_cache_s3_bucket’ in hydra.conf");auto store = make_ref<S3BinaryCacheStore>(_localStore,hydraConfig["binary_cache_secret_key_file"],bucketName);store->init();_destStore = std::shared_ptr<S3BinaryCacheStore>(store);}