summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* scheduler.py: Handle exceptions that are caught under the event looptpollard/loop_exceptionTom Pollard2020-01-102-2/+25
| | | | | | The default exception handler of the async event loop bypasses our custom global exception handler. Ensure that isn't the case, as these exceptions are BUGS & should cause bst to exit.
* _frontend/widget.py: show_pipeline() Don't show buildable for junctionTom Pollard2020-01-092-2/+4
| | | | | Instead output "junction" in magenta for info. Also include test in format/junctions.py
* _pipeline.py: Refactor if/elif/else usageTristan Maat2020-01-081-16/+15
|
* Make PipelineSelection a proper enum typeTristan Maat2020-01-085-110/+153
| | | | | | | | | | | | | | | | | | PipelineSelection is one of the few stringy types that weren't converted to FastEnum, presumably because we lacked a mechanism for only allowing a sub-set of options as CLI arguments. We've re-designed this since, and as part of the UI/UX refactor we'd like to generally clean this, but that is probably still a while out. Since that hasn't happened, for now, this adds a feature to the FastEnumType that allows specifying only a subset of values is allowed for a specific command, so that we can use the type as a proper enum. We also get rid of a number of accidental uses of strings, and move PipelineSelection to buildstream.types so that we don't have a significant import overhead for it.
* _platform: Don't use psutil.Process.cpu_affinity on unsupported platformschandan/fix-cpu-countChandan Singh2019-12-312-9/+9
| | | | | | | | | | | | | `psutil.Process.cpu_affinity` is not available on many non-Linux platforms, like AIX and Solaris. We already have such a case with Darwin where we need to resort to using `os.cpu_count()`. Rather than adding more subclasses and overrides, add that logic as a fallback in the main `Process` class. `os.cpu_count()` should generally always be available, so hopefully we will only need to override this in future too much or at all. Fixes #1244.
* sandbox: Drop chroot sandboxing backendJürg Billeter2019-12-311-354/+0
| | | | | The chroot sandboxing backend didn't work across platforms and has been replaced by the buildbox-run sandboxing backend.
* _platform: Drop support for chroot sandboxJürg Billeter2019-12-311-21/+0
|
* _scheduler/scheduler.py: Enforce SafeChildWatcherChandan Singh2019-12-241-0/+6
| | | | | In Python 3.8, `ThreadedChildWatcher` is the default watcher that causes issues with our scheduler. Enforce use of `SafeChildWatcher`.
* _state: remove unused add_maximum_progresstraveltissues/remove-unusedDarius Makovsky2019-12-241-3/+0
|
* _sourcecache: remove unused _update_mtimeDarius Makovsky2019-12-241-6/+0
|
* _sourcecache: remove unused _reachable_directoriesDarius Makovsky2019-12-241-9/+0
|
* _sourcecache: remove unused _remove_sourceDarius Makovsky2019-12-241-3/+0
|
* _sourcecache: remove unused list_sourcesDarius Makovsky2019-12-241-10/+0
|
* sandbox: remove unused _issue_warningDarius Makovsky2019-12-241-10/+0
|
* sandbox: remove unused _callbackDarius Makovsky2019-12-241-20/+0
|
* _casbaseddirectory: remove unused _copy_link_from_filesystemDarius Makovsky2019-12-241-3/+0
|
* _platform/platform.py: Add alias for IBM AIX 7 powerpcChandan Singh2019-12-231-3/+11
| | | | | | | | | | | * `uname -m` is unusable in case of IBM AIX 7 as it reports the serial number of the machine. As a workaround, special case it and use the reported processor identifier. * tests/format/optionos.py: Don't use AIX for unsupported architecture `AIX` is special-cased in BuildStream, so use a different system for testing unsupported architectures.
* _platform/platform.py: Add alias for sun4vChandan Singh2019-12-231-0/+1
| | | | | | | | | | | Some Solaris 11 servers report `uname -m` as `sun4v`. It uses the same SPARC v9 processor architecture so add an alias for it as we already support `sparc-v9`. `uname -a` output for reference: $ uname -a SunOS sundev1 5.11 11.3 sun4v sparc sun4v Solaris
* job.py: Do not call Process.close()Jürg Billeter2019-12-191-1/+0
| | | | | | | | | | | As we handle subprocess termination by pid with an asyncio child watcher, the multiprocessing.Process object does not get notified when the process terminates. And as the child watcher reaps the process, the pid is no longer valid and the Process object is unable to check whether the process is dead. This results in Process.close() raising a ValueError. Fixes: 9c23ce5c ("job.py: Replace message queue with pipe")
* _platform/platform.py: Add powerpc64 and powerpc64leJavier Jardón2019-12-171-0/+2
|
* tests: source_determinism.py: Skip flaky test with buildbox-runJürg Billeter2019-12-171-0/+4
| | | | | The tests are flaky due to non-deterministic timestamps in the output of `ls -l`. See https://gitlab.com/BuildStream/buildstream/issues/1218
* testing/_utils/site.py: Add BUILDBOX_RUN variableJürg Billeter2019-12-171-0/+9
|
* testing/runcli.py: Add BST_CAS_STAGING_ROOT environment variableJürg Billeter2019-12-171-0/+7
| | | | | This is required for testing with userchroot to create staging directories in a system-specific prefix.
* utils.py: Use `onerror` in `_force_rmtree`Tristan Maat2019-12-171-11/+16
| | | | | | | | | If we don't, and encounter a file we don't own, but have permission to delete, we'll fail with EPERM, since we won't be able to change permissions but will be able to delete it. Instead, we now try to change permissions and remove a file *after* we realize we couldn't at first.
* sources/git.py: Document that checkout-submodules is recursivetmewett/recursive-gitTom Mewett2019-12-131-2/+6
|
* _gitsourcebase.py: Rename and refactor _ignore_submoduleTom Mewett2019-12-131-11/+12
| | | | | "Ignore submodule" sounds like it could be an action, so this changes the name to more clearly be a predicate.
* _gitsourcebase.py: Manage submodules recursivelyTom Mewett2019-12-131-56/+65
| | | | | | | | | | | Previously, GitSourceBase would only consider immediate submodules of the superproject. It now fetches and stages recursively. To achieve this, this commit somewhat refactors the relationship between GitMirror and GitSourceBase. Enumerating GitMirrors for the submodules is now done in GitMirror itself. GitSourceBase recursively iterates these mirror classes with _recurse_submodules and applies the source configuration with _configure_submodules.
* _gitsourcebase.py: Add and update some comments on _GitMirrorTom Mewett2019-12-131-3/+14
|
* element.py: Only cache sources if some had to be fetchedbschubert/cleanup-element-fetchBenjamin Schubert2019-12-131-1/+1
|
* element.py: Remove temporary variableBenjamin Schubert2019-12-131-2/+2
| | | | | This variable is used only once, when the original is used multiple times. This only increases the cognitive load
* job.py: Replace message queue with pipejuerg/job-pipeJürg Billeter2019-12-121-44/+40
| | | | | | | | A lightweight unidirectional pipe is sufficient to pass messages from the child job process to its parent. This also avoids the need to access the private `_reader` instance variable of `multiprocessing.Queue`.
* tests: Drop buildbox xfailsJürg Billeter2019-12-102-7/+0
|
* Drop buildbox sandboxJürg Billeter2019-12-102-275/+0
| | | | Replaced by buildbox-run.
* _platform: Support experimental buildbox-run sandbox on all platformsJürg Billeter2019-12-102-3/+25
| | | | | The buildbox-run sandbox is used only if BST_FORCE_SANDBOX is set to buildbox-run.
* Add buildbox-run sandboxBenjamin Schubert2019-12-101-0/+148
|
* _sandboxreapi.py: Pass sandbox flags to _execute_action()Jürg Billeter2019-12-102-3/+3
|
* _project.py: Allow junctions to use parent remoteThomas Coldrick2019-12-101-3/+3
| | | | | | | | | | | | At present it doesn't seem to be possible to use ignore-remote-caches and also cache cross-junction artifacts in one's own cache. By passing the parent caches to the junction we ensure that things get cached in the parent cache. For a motivating purpose, consider that one may have a (patched) junction which specifies a cache incompatible with master. This will throw warnings at every invokation of bst, or you won't cache cross-junction artifacts.
* _remote: ignore unused argsDarius Makovsky2019-12-091-1/+1
|
* _profile: ignore unused argsDarius Makovsky2019-12-091-1/+1
|
* resources: remove [un]register_exclusive_interest()Darius Makovsky2019-12-091-50/+0
|
* _project: remove create_artifact_element()Darius Makovsky2019-12-091-13/+0
|
* _pipeline: remove subtract_elements()Darius Makovsky2019-12-091-15/+0
|
* _pipeline: remove targets_include()Darius Makovsky2019-12-091-17/+0
|
* _context: remove set_artifact_directories_optional()Darius Makovsky2019-12-091-10/+0
|
* casserver: remove _digest_from_*_resource_name()Darius Makovsky2019-12-091-45/+0
|
* casserver: remove ArtifactStatus()Darius Makovsky2019-12-091-4/+0
|
* cascache: remove update_tree_mtime()Darius Makovsky2019-12-091-4/+0
|
* _artifactcache: remove _reachable_digests()Darius Makovsky2019-12-091-18/+0
|
* _artifactcache: remove _reachable_directories()Darius Makovsky2019-12-091-18/+0
|
* _artifactcache: remove get_artifact_logs()Darius Makovsky2019-12-091-16/+0
|