← Back to issue list

parts: fix conversion of PartsError

View original Github issue

Metadata

Project
rockcraft
Number
#176
Type
pull request
State
merged
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

Merged fix for PartsError conversion that previously used string representation to populate PartsLifecycleError messages, bypassing craft_cli verbosity controls. Fixes error handling to properly respect verbosity levels.

Suggested action:

No scores available.

Issue body

The previous code was using the PartsError string representation (via str(err)) to populate a PartsLifecycleError's message. This has the effect of adding the original error's `details` into the message, which bypasses craft_cli's error reporting based on verbosity levels. - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- (CRAFT-1538)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged fix for PartsError conversion that previously used string representation to populate PartsLifecycleError messages, bypassing craft_cli verbosity controls. Fixes error handling to properly respect verbosity levels.
qwen3.6-35b-a3b-mtp-q6 Merged fix for PartsError conversion. Using str(err) previously bypassed craft_cli verbosity reporting. The change ensures PartsLifecycleError properly respects verbosity levels. Resolves CRAFT-1538.
qwen3.6-35b-a3b-mtp-q6 Merged fix for PartsError conversion that previously bypassed craft_cli verbosity reporting by relying on string representation. The update ensures proper error message formatting and lifecycle error propagation.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#107 craft_parts: export PartsError in base package (CRAFT-456) craft-parts merged Merged after two approvals and passing CI. Exports PartsError from the craft_parts base package via a single-line change, enabling applications to catch the exception directly without internal module references.
73%
#125 main: add details to the parts specification error message (CRAFT-512) craft-parts merged Merged enhancement to craft-parts CLI that adds specific validation failure details to invalid parts specification errors. Approved by two reviewers and passed CI checks.
72%
#751 Support craft_parts.PartsError as a complex object charmcraft closed Superseded. Error formatting for craft_parts.PartsError will be handled during the craft-application migration instead of implementing custom error handling in charmcraft.
71%
#3675 parts: fix long recursion when verifying dirty steps snapcraft merged Merged. Updates craft-parts to v1.4.2, resolving long recursion loops that blocked the sequencer in dependency-chained projects. Improves verbosity handling and output redirection. Approved by reviewer and passed CI.
70%