← Back to issue list

Pack command errors ugly

View original Github issue

Metadata

Project
craft-application
Number
#705
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #428 (commit c9881992), which improved failure output to identify matching platforms instead of exposing an unhelpful internal error.

Resolution: closed resolved

Reason: PR #428 was merged as commit c9881992. Its change makes unmatched-platform failures identify which platforms matched rather than expose an unhelpful internal error.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description The pack command errors in an ugly way when there are no valid platforms. ### To Reproduce see below ### part yaml ```shell ``` ### Relevant log output ```shell 2025-03-27 15:47:45 Error executing google:ubuntu-24.04-64:tests/spread/core24/platforms:build_for_no_match (mar271510-010725) : ----- + cd ./snaps/build-for-no-match + [[ -e expected-failure.txt ]] + call_args= + [[ -e arguments.txt ]] ++ cat arguments.txt + call_args='--build-for armhf' + env_vars= + [[ -e environmental-variables.txt ]] + eval snapcraft pack --destructive-mode --build-for armhf + MATCH -f expected-failure.txt grep error: pattern not found, got: ++ snapcraft pack --destructive-mode --build-for armhf snapcraft internal error: RuntimeError('Cannot generate a project that builds on amd64 and builds for armhf') Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20250327-154744.732845.log' Traceback (most recent call last): File "/snap/snapcraft/x1/bin/snapcraft", line 8, in <module> sys.exit(main()) ^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 462, in main return app.run() ^^^^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 613, in run return_code = self._run_inner() ^^^^^^^^^^^^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 174, in _run_inner return_code = super()._run_inner() ^^^^^^^^^^^^^^^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 579, in _run_inner project_service.configure(platform=platform, build_for=build_for) File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/services/project.py", line 100, in configure raise RuntimeError( RuntimeError: Cannot generate a project that builds on amd64 and builds for armhf ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #428 (commit c9881992), which improved failure output to identify matching platforms instead of exposing an unhelpful internal error.
stealth/space-bunny-alpha — closed resolved Fixed in craft-application PR #428 (commit c9881992), improving failure output to identify which platforms matched instead of exposing an unhelpful internal error.
qwen/qwen3.6-35b-a3b — — Closed without a fix. Deferred to internal Jira ticket CRAFT-4420. The unhandled RuntimeError for invalid platform builds remains unresolved.
qwen/qwen3.6-35b-a3b — — Closed without a public resolution. The issue was deferred to internal tracking ticket CRAFT-4420 to address the raw traceback and unhandled RuntimeError thrown by the pack command during platform mismatches.
qwen/qwen3.6-35b-a3b — — Closed. Tracked internally via Jira ticket CRAFT-4420 to address the unhelpful RuntimeError from snapcraft pack during platform mismatches. No public fix or resolution details were provided.

Update history

No update history recorded yet.

Related work

Related issues

No related issues found above the similarity threshold.