Distinguish between bubblewrap sandboxing failure and command failure
Description
As stated in #286 (closed) we can't distinguish between a failure to build and a failure to set up the sandbox, because our only reliable interface for how far bubblewrap got is the exit code of the bwrap
command.
https://github.com/projectatomic/bubblewrap/pull/293 added --json-status-fd
to report extra information about bubblewrap's state, which can be used to see whether it actually started the payload command.
Currently it just reports the error differently, but could be used to determine whether a failed build should be cached.
Changes proposed in this merge request:
- Check whether
--json-status-fd
is provided bybwrap
. - If
--json-status-fd
is provided, collect status in a temporary file. - If
--json-status-fd
is provided and no exit code was reported raise aSandboxError
.
This merge request, when approved, will close issue/bug: #286 (closed)
CHANGELOG/Release Notes
- Initial version. WIP as it depends on bubblewrap upstream
- Rebased to fix conflict with cf2e0059
Edited by richardmaw-codethink