diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-02-28 14:45:48 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-02-28 14:45:48 +0000 |
commit | 348f04e7a80338de1b9cc911e48263d8cd31be65 (patch) | |
tree | d3e13242dae0286d92b89c5c7f3b57602c873a1e | |
parent | 60e62439292391817a642ddb5fe6cd7503acfa50 (diff) | |
parent | 28a3387fd13f1cea0f7bb55eb3b79d7c50ee74ee (diff) | |
download | buildstream-348f04e7a80338de1b9cc911e48263d8cd31be65.tar.gz |
Merge branch 'aevri/dyn_minimum_cache_msg' into 'master'
cascache: don't hardcode 2G warning string
See merge request BuildStream/buildstream!1193
-rw-r--r-- | buildstream/_cas/cascache.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/buildstream/_cas/cascache.py b/buildstream/_cas/cascache.py index 40d7efe78..08860bacc 100644 --- a/buildstream/_cas/cascache.py +++ b/buildstream/_cas/cascache.py @@ -1228,9 +1228,11 @@ class CASQuota: if cache_quota is None: # Infinity, set to max system storage cache_quota = cache_size + available_space if cache_quota < self._cache_quota_headroom: # Check minimum - raise LoadError(LoadErrorReason.INVALID_DATA, - "Invalid cache quota ({}): ".format(utils._pretty_size(cache_quota)) + - "BuildStream requires a minimum cache quota of 2G.") + raise LoadError( + LoadErrorReason.INVALID_DATA, + "Invalid cache quota ({}): BuildStream requires a minimum cache quota of {}.".format( + utils._pretty_size(cache_quota), + utils._pretty_size(self._cache_quota_headroom))) elif cache_quota > total_size: # A quota greater than the total disk size is certianly an error raise CASCacheError("Your system does not have enough available " + |