Open lengau opened 11 months ago
Full process log:
snapcraft-20231215-111314.031750.log
My suggestion for handling snap pack
errors would be something along the lines of:
Packing snap failed with error code {returncode}. Full command output is available in the execution log.
Final error message was: {last_line}
Since snap pack
often has very long, possibly redundant output, this provides a clearer error message whilst still limiting the output shown in brief mode to only what is typically a summary.
Same problem in https://launchpad.net/~liushuyu-011/+snap/deno-snap/+build/2472567. This built takes 34 hours and there is no useful output
@liushuyu
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2912.
This message was autogenerated
For context:
@tigarmo, @sergiusens, and I agreed that we need to show the error in brief mode with better formatting and as a SnapdError
. This is blocked by snapd
work: https://warthogs.atlassian.net/browse/SNAPDENG-23795 and https://bugs.launchpad.net/snapd/+bug/2070926?comments=all
Two more bug reports for this issue:
Another bug report for this issue with an context of how it makes debugging CI builds very challenging: https://github.com/canonical/snapcraft/issues/4933
A note on the Launchpad builds: this is even more of a problem on Launchpad than locally, as the logs don't get included in the failed output.
Bumping this because I've spent far too long not knowing why things are failing. The current output is entirely useless and anxiety inducing, because it doesn't tell you what's wrong. Like a child who can't use words but can huff. I get huffed at enough, I don't want snap
to huff at me too
Another report where Launchpad builds on uncommon architectures (riscv64) produce unhelpful error messages: https://bugs.launchpad.net/snapcraft/+bug/2080728
Once snapd 2.66 is released, snapcraft will be able to show the stderr from snapd.
Snapcraft will need to filter the stderr and only show the line that begins with error:
as snapd still outputs internal go errors.
Bug Description
If
snap pack
fails, the error message (which is often helpful in determining why it failed) is hidden unless you enable debug logging or look in the detailed log file. Instead, the error message shows the specific command that was run in the instance (which isn't particularly useful to the user).To Reproduce
Run
snapcraft pack
with the providedsnapcraft.yaml
.Environment
Kubuntu 23.04
snapcraft.yaml
Relevant log output
Additional context
No response