summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Update all python dependenciesBenjamin Schubert2019-12-021-1/+1
| | | | | | | | This updates all dependencies on the project, which is mainly needed by python3.8 but can be done independentely. This also disables multiple false positive lint errors and disable a new check that we don't need.
* lint: remove all unecessary elif/else after break/continueBenjamin Schubert2019-12-028-21/+21
| | | | | Newer pylint versions detect and complain about unnecessary elif/else after a continue/break/return clause. Let's remove them
* lint: Remove unnecessary list comprehensionsBenjamin Schubert2019-12-024-4/+4
| | | | | Newer version of pylint detect when a comprehension would not be needed. Let's remove all the ones that are indeed extraneous
* _sandboxreapi.py: Ensure /dev, /proc and /tmp exist in sandboxJürg Billeter2019-11-271-0/+4
|
* _sandboxreapi.py: Check that command existsJürg Billeter2019-11-271-0/+5
|
* _sandboxreapi.py: Fix Command.working_directoryJürg Billeter2019-11-271-1/+1
| | | | | The working directory must be specified relative to the input root, i.e., the leading slash must be dropped.
* sandbox.py: Assert that the working directory is an absolute pathJürg Billeter2019-11-271-1/+3
| | | | Sandbox implementations rely on this.
* tests: Allow strict contents in assert_containsDarius Makovsky2019-11-271-3/+17
|
* Clear last_successful for soft-reset of WorkspaceDarius Makovsky2019-11-271-0/+1
|
* Do not load the workspace.last_successful as the workspace plugin refDarius Makovsky2019-11-272-3/+5
| | | | | | Set the workspace plugin `__last_successful` attribute. loader: Use empty string as default when last_successful is missing
* element: always prepare sandboxesDarius Makovsky2019-11-271-13/+2
|
* compose: Allow compose elements to run integration commandsValentin David2019-11-261-3/+0
|
* _stream.py: Remove dead code and comments about trackingBenjamin Schubert2019-11-254-66/+22
| | | | | We don't have many of the `--track` options anymore, so we can remove handling for them in parts of the code that don't need it.
* testing/integration.py: Respect umask for the integration cacheTristan Maat2019-11-251-0/+4
|
* tar.py: Respect umaskJürg Billeter2019-11-251-5/+6
| | | | This allows access by buildbox-casd running as different user.
* tar.py: Make directories with incorrect permissions traversableTristan Maat2019-11-251-2/+6
|
* element.py: Make build directory a proper utils._tempdirTristan Maat2019-11-251-15/+6
|
* utils.py: Respect umask in _tempdir()Jürg Billeter2019-11-251-1/+18
| | | | | | | This allows access by buildbox-casd running as different user with a suitable umask. As this is not generally safe in global temp directories such as /tmp, make the `dir` parameter mandatory and add a note to the documentation.
* utils.py: Respect umask in save_file_atomic()Jürg Billeter2019-11-251-0/+2
| | | | This allows access by buildbox-casd running as different user.
* utils.py: Add get_umask() methodJürg Billeter2019-11-251-0/+16
|
* CASDChannel: don't need to call GetCapabilitiesAngelos Evripiotis2019-11-221-5/+1
| | | | | It doesn't seem like we need to call GetCapabilities here, as we're not querying anything. Remove the call to save some time.
* CASCache: comment on need for __getstate__Angelos Evripiotis2019-11-221-0/+5
|
* cascache: _CASCacheUsageMonitor has channelAngelos Evripiotis2019-11-222-14/+6
| | | | | | Change _CASCacheUsageMonitor to hold a CASDChannel instead of it's parent CASCache. This means that when in spawn mode, we don't need to pickle the CASCache, only the CASDChannel.
* Extract casd_channel logic to CASDChannelAngelos Evripiotis2019-11-223-71/+113
| | | | | | | | | | | | Encapsulate the management of a connection to CASD, so we can hide the details of how it happens. This will make it easier to port to Windows, as we will have to take a different approach there. Remove the _LimitedCASDProcessManagerProxy, as CASDChannel does everything the child jobs will need. Also make get_local_cas() public, since it is already used outside of the CASCache class. Make get_cas() public to match.
* CASDProcessManager: 'release_resources' conventionAngelos Evripiotis2019-11-222-16/+12
| | | | | | | Elsewhere in cascache, cleaning up is called 'release_resources', so follow that convention for consistency. Also fix a case where self.process was not set to None in terminate().
* cascache: extract CASDProcess in new moduleAngelos Evripiotis2019-11-224-141/+202
| | | | | | | | | | Make it easier to specialize handling of the buildbox-casd process on Windows, by splitting it into it's own class. This allows us to encapsulate some decisions, and decreases the complexity of the CASCache class. Take some of the complexity out of this file by splitting the responsibility of managing the process out to another file.
* _stream.py: Refactor `Stream._load()` a littleTristan Maat2019-11-221-32/+72
| | | | | | There was some duplicated functionality between `Stream._load()` and `Stream._load_tracking()`, this is factored out and hopefully makes the cognitive complexity a bit lower.
* Remove `Element._schedule_tracking()`Tristan Maat2019-11-223-42/+8
|
* Fix stacktraces during element loadingTristan Maat2019-11-221-2/+15
| | | | | | | | | | These were caused by unhandled errors from plugins when calling `Source.get_consistency()`. This doesn't really solve the problem, since that interface is still used un-wrapped elsewhere, but it enables removing `Element.__schedule_tracking()` and fixes a bug. Ultimately we'd like to remove `Source.get_consistency()`, so this isn't too long-term of a problem.
* Remove early skipping of already-fetched sourcesTristan Maat2019-11-221-5/+1
|
* Simplify queue managementTristan Maat2019-11-222-15/+4
|
* Schedule elements instead of "requiring" themTristan Maat2019-11-224-70/+11
|
* Remove all `--track` optionsTristan Maat2019-11-222-173/+86
|
* Improve help message for workspace soft-resetDarius Makovsky2019-11-192-2/+6
|
* element.py: Refactor __update_ready_for_runtime()Tristan Maat2019-11-181-19/+30
| | | | | | Just as with the previous commit, inspired by our code quality linter. Poor practice from the previous function probably snuck in here too.
* element.py: Refactor __update_strict_cache_key_of_rdeps()Tristan Maat2019-11-181-14/+26
| | | | | This is on suggestion of our code quality linter - it should make understanding the pre-requisites of the function simpler.
* element.py: Reduce calls to __update_cache_key_non_strictTristan Maat2019-11-182-3/+24
|
* element.py: Make ex-_update_state() components privateTristan Maat2019-11-181-17/+19
|
* element.py: Remove `_update_state()`Tristan Maat2019-11-181-16/+3
|
* element.py: Only run `_schedule_assemble()` when necessaryTristan Maat2019-11-181-29/+27
|
* element.py: Only `element.__update_artifact_state` when necessaryTristan Maat2019-11-181-7/+9
|
* element.py: Only run `element.__update_cache_keys` when necessaryTristan Maat2019-11-181-13/+29
|
* Create _initialize_state() to capture an _update_state() use caseTristan Maat2019-11-184-18/+71
|
* Only run `element.__update_source_state` when necessaryTristan Maat2019-11-184-7/+23
|
* element.py: Remove workspace-specific codeTristan Maat2019-11-182-36/+13
| | | | | This was previously used to handle unstable cache keys, but has been obsoleted by @traveltissues' recent improvements.
* element.py: Refactor `_schedule_assemble`Tristan Maat2019-11-181-10/+32
| | | | | | Move the logic that decides whether we can schedule an element for assembly *into* this function. This makes it a fair bit easier to grok, and reduces the complexity of `_update_state()`.
* plugins/sources/deb: Re-enable import check for arpyChandan Singh2019-11-151-1/+1
| | | | | | | | | In the olden days on linting BuildStream, we did not had plugin dependencies installed in the environment. Now that we run these things via tox, we have all the dependencies (including plugin dependencies) in the virtual environment that tox uses to run the commands. So remove the disabling of import errors for `arpy` module.
* _stream: Force workspace removalDarius Makovsky2019-11-151-1/+1
|
* Reformat code using BlackChandan Singh2019-11-14115-4790/+5011
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* _profile.py: Raise exception if invalid BST_PROFILE topicsTom Pollard2019-11-142-0/+30
| | | | | This is implemented with a new ProfileError, ensuring a user doesn't wait for a profile to complete that was never valid.