← Back to issue list

improve error message

View original Github issue

Metadata

Project
rockcraft
Number
#1243
Type
issue
State
open
Author
beliaev-maksim
Labels
Created
Updated
Closed

Current evaluation

User requests better error messages for chisel digest mismatches. The error is currently raw and confusing. This is a valid UX improvement request for a known issue in craft-parts/rockcraft.

Suggested action: keep open

Reason: The issue is a valid feature request to improve error message clarity for chisel failures (digest mismatches). The error handling logic exists in craft-parts (ChiselError), and while it extracts the raw error, it doesn't provide user-friendly guidance. It should remain open for a maintainer to decide if/when to implement better parsing or documentation.

Impact: 40 Quick Win: 28.0 Staleness: 20 Complexity: 30 Confidence: 85 Support Request: 10

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description It looks like this is a fairly known issue. Can then the error message be intercepted and provide clear instructions for the user? ### Steps to reproduce https://github.com/canonical/roadmap.canonical.com/actions/runs/27006478647/job/79700988207?pr=47 ### Environment https://github.com/canonical/roadmap.canonical.com/actions/runs/27006478647/job/79700988207?pr=47 ### rockcraft.yaml ```yaml ``` ### Log output ```shell 2026-06-05 09:31:48.666 :: error: cannot fetch from archive: expected digest 38b3aedae753733a7db1cb2de6497529cb4350db19fbbb4a3ffb74d52564cae4, got 63da5fc9e01e7a0512e8adb530899ff1fbeb0c76d2909a0f34089e1d27c0687a 2026-06-05 09:31:48.670 Failed to cut requested chisel slices: ca-certificates_data 2026-06-05 09:31:48.670 Detailed information: :: error: cannot fetch from archive: expected digest 38b3aedae753733a7db1cb2de6497529cb4350db19fbbb4a3ffb74d52564cae4, got 63da5fc9e01e7a0512e8adb530899ff1fbeb0c76d2909a0f34089e1d27c0687a 2026-06-05 09:31:48.675 Traceback (most recent call last): 2026-06-05 09:31:48.675 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/packages/deb.py", line 849, in _unpack_stage_slices 2026-06-05 09:31:48.675 process_run( 2026-06-05 09:31:48.675 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/packages/deb.py", line 909, in process_run 2026-06-05 09:31:48.675 os_utils.process_run(command, logger.debug, **kwargs) 2026-06-05 09:31:48.675 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/utils/os_utils.py", line 342, in process_run 2026-06-05 09:31:48.675 raise subprocess.CalledProcessError(ret, command) 2026-06-05 09:31:48.675 subprocess.CalledProcessError: Command '['chisel', 'cut', '--ignore=unmaintained', '--ignore=unstable', '--root=/root/parts/fastapi-framework/runtime/install', 'ca-certificates_data']' returned non-zero exit status 1. 2026-06-05 09:31:48.675 2026-06-05 09:31:48.676 The above exception was the direct cause of the following exception: 2026-06-05 09:31:48.676 Traceback (most recent call last): 2026-06-05 09:31:48.676 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/services/lifecycle.py", line 355, in run 2026-06-05 09:31:48.676 self._exec(actions) 2026-06-05 09:31:48.676 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/services/lifecycle.py", line 379, in _exec 2026-06-05 09:31:48.677 aex.execute(action, stdout=stream, stderr=stream) 2026-06-05 09:31:48.677 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/executor/executor.py", line 360, in execute 2026-06-05 09:31:48.677 self._executor.execute(actions, stdout=stdout, stderr=stderr) 2026-06-05 09:31:48.677 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/executor/executor.py", line 160, in execute 2026-06-05 09:31:48.677 self._run_action(act, stdout=stdout, stderr=stderr) 2026-06-05 09:31:48.678 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/executor/executor.py", line 253, in _run_action 2026-06-05 09:31:48.678 handler.run_action(action, stdout=stdout, stderr=stderr) 2026-06-05 09:31:48.678 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/executor/part_handler.py", line 313, in run_action 2026-06-05 09:31:48.678 state = handler(step_info, stdout=stdout, stderr=stderr) 2026-06-05 09:31:48.678 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-06-05 09:31:48.678 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/executor/part_handler.py", line 456, in _run_build 2026-06-05 09:31:48.678 self._unpack_stage_packages() 2026-06-05 09:31:48.678 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/executor/part_handler.py", line 1329, in _unpack_stage_packages 2026-06-05 09:31:48.678 packages.Repository.unpack_stage_packages( 2026-06-05 09:31:48.678 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/packages/deb.py", line 798, in unpack_stage_packages 2026-06-05 09:31:48.678 cls._unpack_stage_slices( 2026-06-05 09:31:48.678 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_parts/packages/deb.py", line 861, in _unpack_stage_slices 2026-06-05 09:31:48.678 raise errors.ChiselError( 2026-06-05 09:31:48.678 craft_parts.packages.errors.ChiselError: Failed to cut requested chisel slices: ca-certificates_data 2026-06-05 09:31:48.679 :: error: cannot fetch from archive: expected digest 38b3aedae753733a7db1cb2de6497529cb4350db19fbbb4a3ffb74d52564cae4, got 63da5fc9e01e7a0512e8adb530899ff1fbeb0c76d2909a0f34089e1d27c0687a 2026-06-05 09:31:48.820 Emitter: Resuming control of the terminal 2026-06-05 09:31:48.821 Executing in container: lxc --project rockcraft exec local:rockcraft-roadmap-web-rock-amd64-8137775 -- env CRAFT_MANAGED_MODE=1 ROCKCRAFT_DEBUG=False ROCKCRAFT_LXD_REMOTE=local ROCKCRAFT_LAUNCHPAD_INSTANCE=production ROCKCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=true DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /tmp/rockcraft.log 2026-06-05 09:31:48.937 Executing on host: lxc --project rockcraft file pull local:rockcraft-roadmap-web-rock-amd64-8137775/tmp/rockcraft.log /home/runner/tmpf1kga0c0.tmp-craft/tmpfemjki9z 2026-06-05 09:31:49.033 Logs retrieved from managed instance: 2026-06-05 09:31:49.034 Executing on host: lxc --project rockcraft config device show local:rockcraft-roadmap-web-rock-amd64-8137775 2026-06-05 09:31:49.127 Executing on host: lxc --project rockcraft config device remove local:rockcraft-roadmap-web-rock-amd64-8137775 disk-/root/project 2026-06-05 09:31:49.353 Executing on host: lxc --project rockcraft config device remove local:rockcraft-roadmap-web-rock-amd64-8137775 disk-/tmp/craft-state 2026-06-05 09:31:49.450 Executing on host: lxc --project rockcraft stop local:rockcraft-roadmap-web-rock-amd64-8137775 2026-06-05 09:31:53.324 Executing on host: lxc --project rockcraft list local: --format=yaml 2026-06-05 09:31:53.421 Executing on host: lxc --project rockcraft config set local:rockcraft-roadmap-web-rock-amd64-8137775 user.craft_providers.status FINISHED 2026-06-05 09:31:53.527 Failed to run rockcraft in instance 2026-06-05 09:31:53.534 Traceback (most recent call last): 2026-06-05 09:31:53.534 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/services/provider.py", line 587, in run_managed 2026-06-05 09:31:53.534 instance.execute_run( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType] 2026-06-05 09:31:53.534 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_providers/lxd/lxd_instance.py", line 279, in execute_run 2026-06-05 09:31:53.534 return self.lxc.exec( 2026-06-05 09:31:53.534 ^^^^^^^^^^^^^^ 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_providers/lxd/lxc.py", line 536, in exec 2026-06-05 09:31:53.535 return runner(final_cmd, timeout=timeout, check=check, **kwargs) 2026-06-05 09:31:53.535 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-06-05 09:31:53.535 File "/snap/rockcraft/current/usr/lib/python3.12/subprocess.py", line 571, in run 2026-06-05 09:31:53.535 raise CalledProcessError(retcode, process.args, 2026-06-05 09:31:53.535 subprocess.CalledProcessError: Command '['lxc', '--project', 'rockcraft', 'exec', 'local:rockcraft-roadmap-web-rock-amd64-8137775', '--cwd', '/root/project', '--', 'env', 'CRAFT_MANAGED_MODE=1', 'ROCKCRAFT_DEBUG=False', 'ROCKCRAFT_LXD_REMOTE=local', 'ROCKCRAFT_LAUNCHPAD_INSTANCE=production', 'ROCKCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=true', 'DEBIAN_FRONTEND=noninteractive', 'DEBCONF_NONINTERACTIVE_SEEN=true', 'DEBIAN_PRIORITY=critical', 'CRAFT_PLATFORM=amd64', 'CRAFT_VERBOSITY_LEVEL=TRACE', 'rockcraft', 'pack', '--verbosity', 'trace']' returned non-zero exit status 1. 2026-06-05 09:31:53.535 2026-06-05 09:31:53.535 The above exception was the direct cause of the following exception: 2026-06-05 09:31:53.535 Traceback (most recent call last): 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/application.py", line 693, in run 2026-06-05 09:31:53.535 return_code = self._run_inner() 2026-06-05 09:31:53.535 ^^^^^^^^^^^^^^^^^ 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/application.py", line 670, in _run_inner 2026-06-05 09:31:53.535 return_code = dispatcher.run() or os.EX_OK 2026-06-05 09:31:53.535 ^^^^^^^^^^^^^^^^ 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 576, in run 2026-06-05 09:31:53.535 return self._loaded_command.run(self._parsed_command_args) 2026-06-05 09:31:53.535 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/commands/base.py", line 222, in run 2026-06-05 09:31:53.535 result = self._run(parsed_args, **kwargs) or result 2026-06-05 09:31:53.535 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 663, in _run 2026-06-05 09:31:53.535 return super()._run(parsed_args=parsed_args, step_name=step_name) 2026-06-05 09:31:53.535 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 276, in _run 2026-06-05 09:31:53.535 self._run_manager_for_build_plan(fetch_service_policy) 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 123, in _run_manager_for_build_plan 2026-06-05 09:31:53.535 provider.run_managed(build, bool(fetch_service_policy)) 2026-06-05 09:31:53.535 File "/snap/rockcraft/4543/lib/python3.12/site-packages/craft_application/services/provider.py", line 594, in run_managed 2026-06-05 09:31:53.535 raise craft_providers.ProviderError( 2026-06-05 09:31:53.535 craft_providers.errors.ProviderError: Failed to run rockcraft in instance 2026-06-05 09:31:53.535 Full execution log: '/home/runner/.local/state/rockcraft/log/rockcraft-20260605-092918.306122.log' ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 40
Quick Win: 28.0
Staleness: 20
Complexity: 30
Confidence: 85
Support Request: 10
keep open User requests better error messages for chisel digest mismatches. The error is currently raw and confusing. This is a valid UX improvement request for a known issue in craft-parts/rockcraft.
qwen/qwen3.6-35b-a3b
Staleness: 65
Complexity: 30
Confidence: 90
Support Request: 10
needs triage Feature request to intercept chisel digest mismatch errors and provide clearer user instructions during rockcraft pack. Currently unlabelled and awaiting maintainer triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 20
Confidence: 85
Support Request: 10
needs triage Request to intercept and improve the digest mismatch error message during rockcraft pack to provide clearer user instructions. Currently untriaged with no maintainer response after 35 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 30
Confidence: 80
Support Request: 10
needs triage Request to intercept a specific archive fetch error and provide clearer user instructions. Unattended for 18 days with no maintainer feedback or labels.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-parts#335 (confidence 80%)

    PR #335 improved chisel error handling, but the current implementation still exposes raw chisel output which can be confusing for users experiencing digest mismatches.

Related issues

No related issues found above the similarity threshold.