pickle up errors from build environments

Bug #1793082 reported by Sergio Schvezov
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Claudio Matsuoka

Bug Description

If an error occurs while in the context of a build VM, we have no way for the user to see the error.

Changed in snapcraft:
milestone: none → 3.0
Changed in snapcraft:
milestone: 3.0 → 3.0.1
Changed in snapcraft:
milestone: 3.0.1 → 3.1
Changed in snapcraft:
milestone: 3.1 → 3.1.1
Changed in snapcraft:
assignee: Sergio Schvezov (sergiusens) → Claudio Matsuoka (cmatsuoka)
Changed in snapcraft:
status: Triaged → Confirmed
status: Confirmed → In Progress
Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

Upon facing an unhandled exception, snapcraft:

a) generates traceback data and stores it in the filesystem, and
b) tells the user where the file is (if running on an interactive terminal).

However, if running inside a build provider, the filesystem location is not accessible from the host snapcraft instance. To give user access to error details, we need to retrieve the traceback file from the managed provider. The proposed fix addresses this issue by splitting items (a) and (b) above between the outer and inner instances of snapcraft. Inner instance stores error data in a known location, which is retrieved by outer instance before proceeding to step (b). Outer snapcraft is then able to store error data on the host filesystem and tell the user where it is.

If running non-interactively, trace data is printed to stdout instead of stored in a file. This is handled directly by the inner instance.

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

Amending previous comment: for logic uniformity, all trace data is handled by the outer instance, even when non-interactive.

The following scenarios should be covered:
- with build provider/without build provider (legacy mode)
- interactive/non-interactive

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

(Legacy mode is handled in a completely separated way so it shouldn't have any interaction with this fix.)

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

The fix for this bug also fixes bug #1814429.

Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.