← Back to issue list

catkin, rosdep: stop using FileNotFoundErrors

View original Github issue

Metadata

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

Current evaluation

Merged PR #2270 (de1fe2725), replacing catkin and rosdep FileNotFoundError cases with SnapcraftError-derived exceptions to avoid Sentry tracebacks.

Resolution: closed resolved

Reason: PR #2270 was merged into main as commit de1fe2725. The change converts the affected exceptions so users receive friendly error messages instead of tracebacks reported to Sentry.

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`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- Using non-`SnapcraftError`s results in tracebacks being sent to Sentry instead of nice error messages. Fix this by introducing `SnapcraftError`-derived exceptions for these cases instead of using `FileNotFoundError`s.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2270 (de1fe2725), replacing catkin and rosdep FileNotFoundError cases with SnapcraftError-derived exceptions to avoid Sentry tracebacks.
stealth/space-bunny-alpha — closed resolved Merged in snapcraft/snapcraft#2270 (de1fe2725): catkin and rosdep now use SnapcraftError-derived exceptions instead of FileNotFoundError, preventing tracebacks from reaching Sentry.
qwen/qwen3.6-35b-a3b — — Merged. Replaces FileNotFoundError with SnapcraftError-derived exceptions in catkin and rosdep to prevent raw tracebacks from reaching Sentry. Ensures users receive formatted error messages. Approved by one reviewer and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Replaced FileNotFoundError with SnapcraftError-derived exceptions in catkin and rosdep modules to prevent raw tracebacks from being sent to Sentry and ensure user-friendly error messages.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2255 catkin plugin: use SnapcraftException snapcraft merged Merged PR #2255 as c8017788d, replacing catkin plugin built-in exceptions with SnapcraftException and fixing LP #1791743.
75%
#163 Catkin plugin: use rosdep for dependency resolution snapcraft merged Merged in PR #163 (commit 87b2e24f6), replacing manual Catkin package.xml dependency parsing with rosdep; PR #183 backported the change to Snapcraft 1.x.
74%
#1548406 Catkin plugin: Can't handle rosdep resolving to nothing snapcraft (launchpad) closed Fixed by canonical/snapcraft#331, merged as commit 1c1119ce3; Catkin now treats empty rosdep output as no dependencies instead of an error.
74%
#331 Catkin plugin: Handle rosdep empty and multiple dependencies. snapcraft merged PR #331 merged into snapcraft master as commit 1c1119ce3 (merge e3a2b9d03). It refactored the Catkin plugin's rosdep dependency resolution to handle empty output and multiple packages per line, fixing LP bugs #1548406 and #1548404.
73%
#1392 catkin plugin: extract rosdep into new package snapcraft merged Merged in canonical/snapcraft#1392 (99218f59d), extracting rosdep from Catkin into internal.pullers and resolving #1464.
72%
#1629957 When I try to build a snap with the wrong catkin rosdistro, there is no good error snapcraft (launchpad) closed Invalid catkin rosdistro values now produce a helpful validation error instead of an unfriendly KeyError. Fixed by merged canonical/snapcraft#851 (commit d37b7cda8).
71%
#1548404 Catkin plugin: Can't handle rosdep resolving to multiple packages snapcraft (launchpad) closed Fixed by ubuntu-core/snapcraft PR #331 (commit 1c1119ce3, 'Catkin plugin: Handle rosdep empty and multiple dependencies'), merged as e3a2b9d03; maintainer ~kyrofa linked the PR when closing the Launchpad bug.
71%