← Back to issue list

sources: properly handle pull failures

View original Github issue

Metadata

Project
snapcraft
Number
#2292
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged as commit 1bb56d427, converting source-pull tracebacks and Sentry reports into handled CLI errors and fixing LP: #1794272.

Resolution: closed resolved

Reason: PR #2292 was merged as commit 1bb56d427. It now catches source-pull CalledProcessErrors, including git clone failures, and prints a user-facing error instead of leaking a traceback.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? ----- Currently, the snapcraft CLI doesn't handle any `CalledProcessError`s coming from the sources (e.g. `git clone [...]`). This means that any network issues or invalid repo URLs result in tracebacks and error submissions to Sentry. This PR fixes [LP: #1794272](https://bugs.launchpad.net/snapcraft/+bug/1794272) by properly handling this situation and printing an error.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as commit 1bb56d427, converting source-pull tracebacks and Sentry reports into handled CLI errors and fixing LP: #1794272.
stealth/space-bunny-alpha — closed resolved Merged PR #2292 via commit 1bb56d427, handling source pull CalledProcessErrors to print errors instead of tracebacks and Sentry reports. Fixes LP: #1794272.
qwen/qwen3.6-35b-a3b — — Merged fix for source pull failures that properly handles CalledProcessError. Prevents tracebacks and Sentry reports on network or invalid URL issues by printing a clean error. Fixes LP: #1794272. Approved and merged.
qwen3.6-35b-a3b-mtp-q6 — — Merged fix for LP: #1794272 that catches CalledProcessError exceptions during source operations like git clone. Replaces unhandled tracebacks and Sentry reports with clear, user-facing error messages.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1794272 Errors when pulling sources result in traceback snapcraft (launchpad) closed Source-pull failures now produce clear errors instead of tracebacks and Sentry reports, fixed by canonical/snapcraft#2292 in commit 1bb56d427.
71%