Commits on Source (11)
-
Tristan Van Berkom authored
Instead of sitting mysteriously alone in internals/utils.py
-
Tristan Van Berkom authored
This is not an error related to loading data, like a parse error in the quota specification is, but a problem raised by the artifact cache. * tests/artifactcache/cache_size.py Updated test case to expect the artifact error, which consequently changes the test case to properly assert a machine readable error instead of asserting text in the stderr (which is the real, secret motivation behind this patch). * tests/artifactcache/expiry.py: Reworked test_invalid_cache_quota() Now expect the artifact error for the tests which check configurations which create caches too large to fit on the disk.
-
Tristan Van Berkom authored
Don't require the interest to be registered, just discard any interest, this function is not intended to maintain a balance like the reserve() function is.
-
Tristan Van Berkom authored
When running any session that has Queues which require Resource.CACHE, check if our loaded estimated size exceeds the quota, and if so; lock the Resource.CACHE resource exclusively right away and run an exclusive initial cache size job. This ensures we cleanup first before doing anything which might add to the cache at startup time, if deemed needed. This is a partial fix for issue #737
-
Tristan Van Berkom authored
In order to test when core activities occur by parsing the stderr in tests, we should make the messages conform more. At the same time, this restores alignment of columns in core messages with the element processing related messages. Also, _scheduler/scheduler.py is updated to make it's activity names conform to the (current) 5 character limit for the sake of alignment.
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
We can streamline this call to os.statvfs() in a few places.
-
Tristan Van Berkom authored
This will benefit from a better UtilError being raised, and and turns the artifact cache's local function into a one liner. The loop which finds the first existing directory in the given path has been removed, being meaningless due to the call to os.makedirs() in ArtifactCache.__init__(). The local function was renamed to _get_cache_volume_size() and no longer takes any arguments, which is more suitable for the function as it serves as a testing override surface for unittest.mock(). The following test cases which use the function to override the ArtifactCache behavior have been updated to use the new overridable function name: tests/artifactcache/cache_size.py tests/artifactcache/expiry.py
-
Tristan Van Berkom authored
A simple object which creates a snapshot of current usage statistics for easy reporting in the frontend.
-
Tristan Van Berkom authored
A frontend facing API for obtaining usage statistics. I would have put this on Stream instead, but the Context seems to be the de facto place for looking up the artifact cache in general so let's put it here.
-
Tristan Van Berkom authored
Showing
- buildstream/_artifactcache.py 52 additions, 27 deletionsbuildstream/_artifactcache.py
- buildstream/_context.py 11 additions, 1 deletionbuildstream/_context.py
- buildstream/_frontend/widget.py 18 additions, 14 deletionsbuildstream/_frontend/widget.py
- buildstream/_scheduler/resources.py 1 addition, 1 deletionbuildstream/_scheduler/resources.py
- buildstream/_scheduler/scheduler.py 61 additions, 4 deletionsbuildstream/_scheduler/scheduler.py
- buildstream/utils.py 22 additions, 2 deletionsbuildstream/utils.py
- tests/artifactcache/cache_size.py 28 additions, 0 deletionstests/artifactcache/cache_size.py
- tests/artifactcache/expiry.py 87 additions, 16 deletionstests/artifactcache/expiry.py
- tests/internals/utils.py 0 additions, 34 deletionstests/internals/utils.py
tests/internals/utils.py
deleted
100644 → 0