Skip to content
Snippets Groups Projects

Make bwrap check runtime only

Merged Daniel Silverstone requested to merge danielsilverstone-ct/bwrap-check-runtime-only into master
All threads resolved!

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 running bwrap --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.

Edited by Daniel Silverstone

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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.

  • added 4 commits

    • df0d5a8b - _platform/linux.py: Refactor checks for sandboxing
    • b8421a9c - _site.py: Protect against failure running `bwrap --version`
    • c74bfbe5 - _site.py: Reduce complexity of bwrap version comparison
    • 32d2ad8f - setup.py: Change bwrap assertion to a warning

    Compare with previous version

  • Daniel Silverstone resolved all discussions

    resolved all discussions

  • @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.

  • Jürg Billeter resolved all discussions

    resolved all discussions

  • 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 Billeter
  • added 1 commit

    • c46a7e87 - setup.py: Change bwrap assertion to a warning

    Compare with previous version

  • 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.

  • Jürg Billeter approved this merge request

    approved this merge request

  • Daniel Silverstone unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Daniel Silverstone changed the description

    changed the description

  • mentioned in issue #696 (closed)

  • I opened #696 (closed) to cover the missing test situation

  • Jürg Billeter mentioned in commit fd6a9573

    mentioned in commit fd6a9573

  • mentioned in issue #563 (closed)

  • Please register or sign in to reply
    Loading