Skip to content

Allow debugging of remotely failed builds

Background

This issue is technical debt introduced by #76 (closed) and should be addressed during the 1.3 dev cycle.

Since we now cache the failed build state and the build tree itself in the artifact caches, it is important to make it useful and provide the ability to debug a build artifact whether it failed remotely or locally, consequently changing and cleaning up some codepaths which handle debugging of local build failures in special ways.

Task description

  • Build directories in ~/.cache/buildstream/build should now be cleaned up unconditionally
  • When a build fails and there is an interactive prompt, the code should now use the failed artifact in the cache (including the build tree) in order to reconstruct an environment for debugging.
  • Using the same mechanism, bst shell should now provide a way to launch a build shell from failed build artifact
  • The existing bst shell --sysroot option is collateral damage here, we should make it more coherent and have it work for any provided sysroot; e.g. it should work using a path to a directory where a bst checkout was performed.

Acceptance Criteria

We should have a unified way of debugging a failed build, and no separate codepaths for debugging a failed build which occurred locally or remotely.

For the collateral damage to bst shell --sysroot, if this is not fixed with this issue, a separate issue should be opened to address this breakage - whether this collateral damage is also a blocker to 1.4 is a separate debate.

Edited by Jonathan Maw
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information