Make bwrap check runtime only
Description
The goal of this MR is to make the check for bubblewrap be runtime rather than setup.py time.
As a side-effect, we ensure that the dummy sandbox knows why it was selected so that it can report such if it is invoked to try and run something.
Changes proposed in this merge request:
-
sandbox/_sandboxdummy.py
: Take a reason for use -
_platform/darwin.py
: Give reason for use of dummy sandbox -
_platform/linux.py
: Refactor checks for sandboxing -
_site.py
: Protect against failure runningbwrap --version
-
setup.py
: Change bwrap assertion to a warning
This merge request, when approved, will not close any issue per-se, but will make it possible to install bst on Linux systems where bwrap is not available, but will still report usefully at runtime.
Merge request reports
Activity
added 22 commits
-
56735279...3e5ff5a9 - 17 commits from branch
master
- d60800c9 - sandbox/_sandboxdummy.py: Take a reason for use
- 67f33221 - _platform/darwin.py: Give reason for use of dummy sandbox
- f23e6e80 - _platform/linux.py: Refactor checks for sandboxing
- 13e70232 - _site.py: Protect against failure running `bwrap --version`
- a53aa45c - setup.py: Change bwrap assertion to a warning
Toggle commit list-
56735279...3e5ff5a9 - 17 commits from branch
added 8 commits
-
a53aa45c...3cf38c8e - 2 commits from branch
master
- 59c92bda - sandbox/_sandboxdummy.py: Take a reason for use
- b9ddcd0e - _platform/darwin.py: Give reason for use of dummy sandbox
- 746cc717 - _platform/linux.py: Refactor checks for sandboxing
- 3f81c361 - _site.py: Protect against failure running `bwrap --version`
- d1a5678c - _site.py: Reduce complexity of bwrap version comparison
- fab5bbde - setup.py: Change bwrap assertion to a warning
Toggle commit list-
a53aa45c...3cf38c8e - 2 commits from branch
- Resolved by Daniel Silverstone
Looks good to me, just one minor comment to resolve.
It's worth noting that this MR is
WIP
until appropriate automatic testing can be devised (or if someone in the know decides that it's good enough to unmark it without adding tests)While it would definitely be good to cover systems without usable Bubblewrap or FUSE in CI, I don't think this should block this MR as the non-optimal cases (e.g., no user namespace support) are not currently tested in CI on master either. Assuming the main cases have been manually tested, I'd be fine merging this, filing an issue for the missing test.
@juergbi wrote in this comment
Assuming the main cases have been manually tested, I'd be fine merging this, filing an issue for the missing test.
The main cases have indeed been manually tested, though since I've refactored a little I'll re-test before I re-assert that in another comment. Subsequent issue filing can be done either by myself or if you want to do it, I'll let you.
D.
The underlying issue was filed a few weeks back as #644 (closed). Should mark this MR / the corresponding commit as a fix for it.
Edited by Jürg Billeteradded 1 commit
- c46a7e87 - setup.py: Change bwrap assertion to a warning
The underlying issue was filed a few weeks back as #644 (closed). Should mark this MR / the corresponding commit as a fix for it.
Done.
Also I've re-done my local manual tests and everything seems okay to me.
mentioned in issue #696 (closed)
I opened #696 (closed) to cover the missing test situation
mentioned in commit fd6a9573
mentioned in issue #563 (closed)