summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tox.ini: Add ability to run tests in a randomized orderbschubert/add-randomized-order-testsBenjamin Schubert2019-12-092-0/+22
| | | | | | | | | | Also register them to run nightly. Running tests in a randomized order is a good way of checking whether our tests depend on each others or not. Since we order them globally, tests will take longer to run, but that will give us higher confidence that they are correct.
* Merge branch 'traveltissues/remove-unused-functions' into 'master'Darius Makovsky2019-12-0912-296/+2
|\ | | | | | | | | remove unused functions 1/2 See merge request BuildStream/buildstream!1753
| * _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
| |
| * _basecache: remove has_open_grpc_channels()Darius Makovsky2019-12-091-12/+0
| |
| * _workspaces: remove get_key()Darius Makovsky2019-12-091-38/+0
| |
| * _workspaces: remove invalidate_key()Darius Makovsky2019-12-091-8/+0
| |
| * element: remove _is_required()/__requiredDarius Makovsky2019-12-091-8/+0
| |
| * element: Remove unused method (__reset_cache_data)Darius Makovsky2019-12-091-18/+0
|/
* Merge branch 'bschubert/stricter-asyncio-handling' into 'master'Benjamin Schubert2019-12-072-27/+15
|\ | | | | | | | | Fixes for asyncio loops were we don't follow the documentation See merge request BuildStream/buildstream!1756
| * scheduler.py: Only run thread-safe code in callbacks from watchersbschubert/stricter-asyncio-handlingBenjamin Schubert2019-12-072-2/+12
| | | | | | | | | | | | | | | | Per https://docs.python.org/3/library/asyncio-policy.html#asyncio.AbstractChildWatcher.add_child_handler, the callback from a child handler must be thread safe. Not all our callbacks were. This changes all our callbacks to schedule a call for the next loop iteration instead of executing it directly.
| * job.py: Only start new jobs in a `with watcher:` blockBenjamin Schubert2019-12-071-26/+5
| | | | | | | | | | | | | | | | The documentation (https://docs.python.org/3/library/asyncio-policy.html#asyncio.AbstractChildWatcher) is apparently missing this part, but the code mentions that new processes should only ever be called inside a with block: https://github.com/python/cpython/blob/99eb70a9eb9493602ff6ad8bb92df4318cf05a3e/Lib/asyncio/unix_events.py#L808
| * job.py: Remove '_watcher' attribute, it is not neededBenjamin Schubert2019-12-071-3/+2
|/ | | | We don't need to keep a reference to the watcher, let's remove it.
* Merge branch 'bschubert/optimize-scheduling' into 'master'Benjamin Schubert2019-12-071-9/+18
|\ | | | | | | | | scheduler.py: Optimize scheduling by not calling it unnecessarily See merge request BuildStream/buildstream!1755
| * scheduler.py: Optimize scheduling by not calling it unnecessarilyBenjamin Schubert2019-12-071-9/+18
|/ | | | | | | | | | | | This delays the call to the re-scheduling of jobs until the current event loop as terminated. This is in order to reduce the number of time we call this method per loop, which should reduce the pressure on the loop and allow faster event handling Since the call is now delayed, also ensure we only call it once per loop iteration.
* Merge branch 'chandan/fix-manifest' into 'master'Chandan Singh2019-12-051-10/+6
|\ | | | | | | | | Minor packaging-related fixups See merge request BuildStream/buildstream!1754
| * MANIFEST.in: Minor fixups and improvementsChandan Singh2019-12-051-10/+6
|/ | | | | | | | | | | | | | | This patch contains the following changes: * Remove include directive for MAINTAINERS file, that does not exist anymore. Instead, add the COMMITTERS.rst file, which is the logical replacement for the MAINTAINERS file. * Recursively include all requirements files instead of listing them one by one. This also fixes and issue where the cov-requirements files were not included in the source distribution. * Simplify `recursive-include DIR *` to `graft DIR`. These two forms are functionally equivalent, but the latter is a bit easier to understand.
* Merge branch 'chandan/interactive-tests' into 'master'Chandan Singh2019-12-056-0/+167
|\ | | | | | | | | Add tests for interactive BuildStream operations See merge request BuildStream/buildstream!1706
| * Add tests for failed build in interactive modeChandan Singh2019-12-052-0/+115
| |
| * Add tests for interactive `bst init`Chandan Singh2019-12-052-0/+49
| | | | | | | | | | Add tests for interactive `bst init` command using [pexpect](https://pexpect.readthedocs.io).
| * requirements: Add pexpect for running interactive testsChandan Singh2019-12-052-0/+3
|/
* Merge branch 'juerg/cas-directory-reset' into 'master'Jürg Billeter2019-12-053-10/+8
|\ | | | | | | | | _sandboxreapi.py: Reset CasBasedDirectory instead of recreating it See merge request BuildStream/buildstream!1749
| * sandbox.py: Remove unused _set_virtual_directory() methodJürg Billeter2019-12-051-6/+0
| |
| * _sandboxreapi.py: Use CasBasedDirectory._reset()Jürg Billeter2019-12-051-3/+2
| | | | | | | | | | | | Calling _reset() instead of completely replacing the object fixes element plugins that use a virtual directory object across Sandbox.run() calls such as the compose plugin with integration commands.
| * _casbaseddirectory.py: Add _reset() methodJürg Billeter2019-12-051-1/+6
|/ | | | This reinitializes a CASBasedDirectory object from a directory digest.
* Merge branch 'juerg/runcli-unused-parameter' into 'master'Jürg Billeter2019-12-051-34/+5
|\ | | | | | | | | testing/runcli.py: Remove unused configure parameter from run() methods See merge request BuildStream/buildstream!1748
| * testing/runcli.py: Remove unused configure parameter from run() methodsJürg Billeter2019-12-051-34/+5
|/
* Merge branch 'bschubert/ci-improvements' into 'master'Jürg Billeter2019-12-041-20/+24
|\ | | | | | | | | Multiple CI improvements See merge request BuildStream/buildstream!1747
| * .gitlab-ci.yml: Don't overwrite sast job directly, just inject variableBenjamin Schubert2019-12-041-3/+4
| | | | | | | | | | We can remove the sast job overwriting and instead 'just' add the variable it needs to the global variables.
| * .gitlab-ci.yml: Extract docker images version in a variableBenjamin Schubert2019-12-041-16/+19
| | | | | | | | | | Our image versions tend to drift over time. Let's use a variable to ensure they are always all at the same version.
| * .gitlab-ci.yml: List all test envs explicitely for toxBenjamin Schubert2019-12-041-1/+1
|/ | | | | Contrary to what we thought, those don't get expanded, and we ended up having the external tests run only for py35, which is incorrect.
* Merge branch 'juerg/casd-separate-user' into 'master'Jürg Billeter2019-12-038-13/+87
|\ | | | | | | | | Support buildbox-casd running as separate user See merge request BuildStream/buildstream!1737
| * tests: source_determinism.py: Do not use too restrictive test umasksjuerg/casd-separate-userJürg Billeter2019-12-032-4/+14
| | | | | | | | | | | | | | | | To protect the local cache of buildbox-casd from corruption without the use of FUSE, buildbox-casd has to run as a different user. Use less restrictive umasks in the source determinism tests to allow buildbox-casd to function when it is running as a separate user.
| * tests/integration/filter.py: Do not use checkout --hardlinksJürg Billeter2019-12-031-1/+1
| | | | | | | | This is not necessary and doesn't work with CASD_SEPARATE_USER.
| * tests/frontend/pull.py: Do not use checkout --hardlinksJürg Billeter2019-12-031-2/+2
| | | | | | | | This is not necessary and doesn't work with CASD_SEPARATE_USER.
| * tests/frontend/buildcheckout.py: Cannot hardlink with CASD_SEPARATE_USERJürg Billeter2019-12-031-1/+7
| | | | | | | | | | Linux does not allow hardlinks to read-only files of other users by default since Linux 3.6 (see /proc/sys/fs/protected_hardlinks).
| * testing/_utils/site.py: Add CASD_SEPARATE_USER variableJürg Billeter2019-12-031-0/+5
| | | | | | | | | | This is set to True if buildbox-casd is installed with the set-uid bit and thus, indicates whether buildbox-casd is running as a separate user.
| * utils.py: safe_link(): Copy if hardlink creation is not permittedJürg Billeter2019-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | By default, Linux doesn't allow creating hardlinks to read-only files of other users since Linux 3.6 (see /proc/sys/fs/protected_hardlinks). This fixes staging when buildbox-casd is running as a separate user and the traditional bubblewrap sandboxing backend is used. This combination is not recommended, however, it's triggered in CI by docker images that run buildbox-casd as a separate user and a few test cases that override BST_FORCE_SANDBOX.
| * casdprocessmanager.py: Set up socket path via a symlinkTristan Maat2019-12-031-4/+57
|/ | | | | | | | | | | This is necessary to allow using buildbox-run with userchroot in the near future, since currently only the owner of the BuildStream process can access the CASD socket, but the buildbox-casd binary will need to be setuid' to another user. This gets around this limitation by allowing the group to access a symlink, which in turn should point to a directory owned by the CASD user.