← Back to issue list

Capture error in step scriptlet execution

View original Github issue

Metadata

Project
craft-parts
Number
#939
Type
issue
State
closed
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Step scriptlet stderr is now captured and surfaced. Maintainer cmatsuoka closed the issue on 2025-01-24 with "Fixed in #966", PR #966 (commit 49cde073) merged and released in craft-parts 2.3.0 (2025-01-20).

Resolution: closed resolved

Reason: Maintainer cmatsuoka closed the issue with "Fixed in #966"; PR #966 "executor: allow capturing error message from scriptlets" merged as commit 49cde073 and the 2.3.0 changelog records "Get the error output from step scriptlet execution and surface it when raising ScriptletRunError". Step handler now raises errors.ScriptletRunError with the captured stderr for both built-in and overridden step handlers.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Refactor step handling to allow proper stderr capture when a part that overrides the built-in step handler fails. ### Why it needs to get done We want consistent error handling in both built-in and user-defined step execution.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Step scriptlet stderr is now captured and surfaced. Maintainer cmatsuoka closed the issue on 2025-01-24 with "Fixed in #966", PR #966 (commit 49cde073) merged and released in craft-parts 2.3.0 (2025-01-20).
stealth/space-bunny-alpha — closed resolved Fixed in merged PR #966 (49cde073): step execution now captures scriptlet stderr, providing consistent errors for overridden and built-in step handlers.
stealth/space-bunny-alpha — closed resolved Fixed by merged craft-parts PR #966 (49cde073), which replaced named pipes with Unix sockets so custom step scriptlet failures capture errors and raise PluginBuildError.
qwen/qwen3.6-35b-a3b — — Fixed in PR #966. Refactored step handling to properly capture stderr when overridden step handlers fail, ensuring consistent error handling for built-in and user-defined step execution.
qwen/qwen3.6-35b-a3b — — Fixed in PR #966. Refactored step handling to properly capture stderr when parts override built-in step handlers and fail, ensuring consistent error handling for both built-in and user-defined step execution.
qwen/qwen3.6-35b-a3b — — Fixed in pull request #966. Refactored step handling to properly capture stderr when custom step handlers fail, ensuring consistent error handling for built-in and user-defined steps.
qwen3.6-35b-a3b-mtp-q6 — — Refactored step handling to properly capture stderr during failed part step execution. Resolved and fixed via pull request #966, ensuring consistent error handling for both built-in and user-defined step execution.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/craft-parts#966 (confidence 98%)

    PR 'executor: allow capturing error message from scriptlets' merged as 49cde073; cited by the maintainer as the fix and shipped in 2.3.0.

Related issues

Issue Project State Summary Similarity
#5203 feat(parts): capture error message from scriptlets snapcraft closed Closed unmerged; commit 1b44db714 later made the equivalent Craft Parts 2.1.0 bump, delivering scriptlet stderr capture through canonical/craft-parts#897.
72%