Loading
Commits on Source 91
-
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 - this allows us to assert more specific machine readable errors in test cases (instead of checking the string in stderr, which this patch also fixes). This also removes a typo from the error message in the said error. * 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
Tristan/insufficient storage error See merge request !1102
-
Tristan Van Berkom authored
Instead of a single target, we can always provide a single target in a list.
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
Reduce number of calls to `bst show` in tests See merge request !1103
-
This tests how BuildStream reacts when it fails to write the tracking results to the element files or project.refs file, which is an operation that plugins do not play a part in. As such, removing the per repo kind parameterization from this test as multiple runs are redundant here.
-
Tristan Van Berkom authored
test_track_error_cannot_write_file() fixup See merge request !1104
-
Previously, it merely tested that buildstream did not fall other, rather than whether it did anything useful.
-
Previously, there was no way of detecting whether fetching happened, as an element with an open workspace will not be fetched.
-
Jürg Billeter authored
Add tests to cover reinstated support for guessing targets See merge request !1042
-
Jürg Billeter authored
There is no reason to disallow guess_element() for bst build --all.
-
_versions.py: Bump format version
-
Jürg Billeter authored
_frontend/cli.py: Use new methods. Based on patches by Phillip Smyth.
-
Jürg Billeter authored
This filters out junctions from the list of targets.
-
Jürg Billeter authored
Junctions cannot be built, pulled, or pushed. Specifying a junction on the command line for these commands will result in an error. However, junctions may be in the list of default targets, so they need to be ignored for build, pull, and push commands.
-
Jürg Billeter authored
-
-
Jürg Billeter authored
-
Jürg Billeter authored
-
Jürg Billeter authored
Test that `bst build` does not fail in a project where the list of default targets includes a junction (junctions cannot be built).
-
-
Jürg Billeter authored
Add support for default targets See merge request !925
-
Tristan Van Berkom authored
Don't require the interest to be registered, just discard any interest, this function just sets a bit in a mask, and 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. The tests/frontend/logging.py test gets it's regexes updated for the log lines it checks for in stderr.
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
Cache management fixes See merge request !1091
-
Tristan Van Berkom authored
The artifact cache emits messages, and we want to allow that in preflight.
-
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
-
Tristan Van Berkom authored
This also adds some comments around the main status bar heading rendering function.
-
Tristan Van Berkom authored
Added some useful status messages when: * Calculating a new artifact cache usage size * Starting a cleanup * Finishing a cleanup Also enhanced messaging about what was cleaned up so far when aborting a cleanup.
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
-
Tristan Van Berkom authored
Updates the known cache size in the main process while the cleanup process is ongoing, so that the status indicators update live while the cleanup happens.
-
Tristan Van Berkom authored
This seems to have been copy/pasted from cascache, and documents the function to possibly return None if defer_prune was specified, but this function does not expose defer_prune.
-
Tristan Van Berkom authored
Cache management logging enhancements See merge request !1105
-
James Ennis authored
profile_start() and profile_end() calls have been incorporated into Scheduler.run()
-
James Ennis authored
profile_start() and profile_end() calls have been added to Stream.load_selection()
-
James Ennis authored
-
James Ennis authored
Add new 'scheduler' and 'load-selection' profiling topics See merge request !1088
-
Tristan Van Berkom authored
Instead only rely on the headroom to be enough to protect against out of space conditions. The headroom can become configurable as a separate step is required. The changes to achieve this are: * Rename ArtifactCache.has_quota_exceeded() to ArtifactCache.full(). * ArtifactCache.full() now also reports True if the available space on the artifact cache volume is smaller than the headroom. This ensures jobs get triggered to cleanup the cache when reaching the end of the disk. * When loading the artifact quota, it is now only an error if the quota exceeds the overall disk space, not if it does not fit in the available space. It is still a warning if the quota does not fit in the available space on the artifact cache volume. * Updated scheduler.py and buildqueue.py for the API rename * tests: Updated the artifactcache/expiry.py test for its expectations in this regard. Added a new test to test an error when quota was specified to exceed total disk space, and adjusted the existing tests to expect a warning when the quota does not fit in the available space. This fixes issue #733 and #869. -
Tristan Van Berkom authored
_artifactcache.py: Don't require the quota to be available on disk. Closes #869 and #733 See merge request !1106
-
Previously, one had to manually install `click-man` package, and remember to run the correct command. Now, we can simply run `tox -e man` to update the man pages.
-
Notable changes: * New `source` and `artifact` command groups * Man pages corresponding to obsolete commands, that were marked as hidden in Click, have now been removed. Fixes #881.
-
Simplify our docs, by requesting users to run `tox -e man` to update man pages, instead of manually installing `click-man` and running the command manually.
-
If the `man` directory is empty, then it won't be copied in the source distribution, and `list_man_pages()` will throw an exception when trying to list files in a non-existent directory. This prevents us from installing the BuildStream package when the man pages are not there. The most common use-case for this is when we want to re-generate the man pages but want to install the package before re-generating them.
-
Tristan Van Berkom authored
Generate man pages using tox & update them Closes #880 and #881 See merge request !1107
-
Angelos Evripiotis authored
-
Angelos Evripiotis authored
Now that 'bst track' is obsolete, change guidance to refer to the replacement 'bst source track' instead.
-
Angelos Evripiotis authored
Now that 'bst fetch' is obsolete, change guidance to refer to the replacement 'bst source fetch' instead.
-
Angelos Evripiotis authored
Fixup refs to 'bst track' and 'bst fetch' See merge request !1086
-
Tom Pollard authored
use_artifact_config added as an optional default arg, allowing for loading of given elements artifact remote config.
-
Tom Pollard authored
Provide bst shell --use-buildtree the ability to attempt to acquire missing buildtrees, given respective option, user pull-buildtree context and remote availability. _frontend/cli.py: Refactor logic for determining --use-buildtree option with given opportunity to attempt pulling a non-local buildtree. Element loaded with artifact_config to allow remote querying. _stream.py: With given user option and element state, construct PullQueue to fetch remote buildtree. Continue or Error without buildtree if cannot be attained. tests/integration/build-tree.py: Update to support new usecases
-
Tom Pollard authored
Download buildtrees on demand for bst shell --use-buildtree Closes #829 See merge request !1050
-
Abderrahim Kitouni authored
This is needed since 0f2bc375
-
Abderrahim Kitouni authored
This is needed since 629a6e52, and was lost in the conversion to requirements.in
-
Javier Jardón authored
requirements/requirements.in: update minimum versions Closes #884 See merge request !1114
-
Job can complete before we return from `Job.span()` to `Scheduler._spawn_job()`, so that `_active_jobs` would not yet contain the job. This would print a stack on the console and try to run a second time the job which can have unexpected effects. In order to reproduce the issue, in `buildstream/_scheduler/jobs/job.py`, in `Job.spawn`, add a call to `time.sleep()` right before call to `asyncio.get_child_watcher()`. This fixes issue #857.
-
Jürg Billeter authored
Fix crash when spawned job completes very fast Closes #857 See merge request !1095
-
Fixes #882.
-
Jürg Billeter authored
Fix type of error codes in CAS server Closes #882 See merge request !1099
-
Fixes #873
-
Jürg Billeter authored
Make sure testing cache directory exists Closes #873 See merge request !1092
-
Angelos Evripiotis authored
This is a breaking change, as it affects behaviour that people might be relying on. An entry has been added to NEWS. As proposed on the mailing list, this change removes the unconditional prompts on: o: bst workspace reset o: bst workspace close --remove-dir If interactive, these commands would always interrupt you with a prompt like this: This will remove all your changes, are you sure? This seems like it may just save someone's work some time. It may also condition folks to hit 'y' quickly without thinking. This change also makes the non-interactive behaviour consistent with the interactive behaviour in the default case. There is also the case of the prompt configured by 'really-workspace-close-project-inaccessible', which may be tackled in later work. This change also removes the new config options to suppress those prompts, and their associated news entry. The relevant bit of the mailing list conversation is here: https://mail.gnome.org/archives/buildstream-list/2018-December/msg00106.html The issue to make interactive and non-interactive behaviour consistent is here: #744 -
Angelos Evripiotis authored
BREAK:remove unconditional 'are you sure?' prompts See merge request !1061
-
Dor Askayo authored
Also bump the element's version so cached artifacts would be invalidated. Fixes #883
-
James Ennis authored
filter.py: don't recurse when staging dependencies Closes #883 See merge request !1110
-
James Ennis authored
This commit removes the method ArtifactCache.get_artifact_fullname() and replaces it with Element.get_artifact_name() Given a key, we are now able to construct the full name of any of an element's artifacts.
-
James Ennis authored
This ensures that we can determine whether an artifact is locally cached (as well as an element) using the ArtifactCache API.
-
James Ennis authored
-
James Ennis authored
The ArtifactElement class is to be used when we want to pass a dummy artifact to our scheduler, typically this will be when we are directly working with artifact refs.
-
James Ennis authored
-
James Ennis authored
-
James Ennis authored
There is no need for this method to use a cas object. Furthermore, we should search for artifact globs in the project's element path, not the project's directory, as these may differ.
-
James Ennis authored
A CasBasedDirectory object of an artifacts logs can be obtained with ArtifactCache.get_artifacts_log(). This ultimately calls CASCache.get_top_level_dir() to obtained a CasBasedDirectory of an artifact's subdirectory (or subdirectories).
-
James Ennis authored
The loading of elements and the handling of artifacts does not belong in this module. Such logic should be invoked using the Stream API
-
James Ennis authored
This method has been moved to Stream, where is it used there exclusively.
-
James Ennis authored
This commit ensures that CASCache.list_refs(), and ArtifactCache.list_artifacts(), can both handle glob expressions.
-
James Ennis authored
_classify_artifacts() no longer filters glob expressions by first obtaining a list of ALL refs locally cached. We know only obain refs specified by the glob expression. Furthermore, the Project.element_path is used to start searching for globbed elements as opposed to the Project.directory.
-
James Ennis authored