← Back to issue list

Remove BuilddBaseAlias string-match guard in handle_runtime_error

View original Github issue

Metadata

Project
craft-application
Number
#1086
Type
issue
State
open
Author
tonyandrewmeyer
Labels
Created
Updated
Closed

Current evaluation

Issue about removing a string-match guard for BuilddBaseAlias ValueError in handle_runtime_error, blocked by craft-providers#969

Suggested action: needs triage

Reason: The issue references code 'introduced in #1082' (craft-application#1082), but that PR is still open and not merged into main. The current HEAD of craft-application/util/logging.py does not contain the string-match guard described. The issue is blocked by craft-providers#969 which is also still open. Maintainers need to decide whether to address this in PR #1082 itself or as a follow-up once both PRs are resolved.

Impact: 20 Quick Win: 15.0 Staleness: 70 Complexity: 25 Confidence: 60 Support Request: 0

Issue body

`craft_application/util/logging.py` (lines ~115-133, introduced in #1082) catches the bare `ValueError("'X.YY' is not a valid BuilddBaseAlias")` from craft-providers by string-matching the message: case ValueError() if "BuilddBaseAlias" in str(error): This is a shallow guard. The proper fix is for craft-providers to raise a typed error at the lookup site; once that lands, this match arm should be replaced by a typed `except` clause (or removed if the upstream handler covers it). Blocked by: canonical/craft-providers#969

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 20
Quick Win: 15.0
Staleness: 70
Complexity: 25
Confidence: 60
Support Request: 0
needs triage Issue about removing a string-match guard for BuilddBaseAlias ValueError in handle_runtime_error, blocked by craft-providers#969
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 30
Confidence: 90
Support Request: 0
needs triage Issue requests replacing a string-match guard for a ValueError with a typed exception handler, pending an upstream fix in craft-providers.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 20
Confidence: 85
Support Request: 0
needs triage Proposes replacing a string-matching ValueError guard in logging.py with a typed exception after an upstream craft-providers fix lands. Currently blocked and awaiting maintainer triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 35
Complexity: 25
Confidence: 90
Support Request: 0
needs triage Replaces a string-match guard for a ValueError in logging.py with a typed exception once craft-providers implements a proper error type. Currently blocked by upstream PR #969 and awaiting maintainer review.

Update history

No update history recorded yet.

Related work

  • Blocked By: canonical/craft-providers#969 (confidence 90%)

    Issue explicitly states it is blocked by this PR, which requests craft-providers raise a typed error instead of bare ValueError for BuilddBaseAlias lookups.

  • Related To: craft-application#1082 (confidence 85%)

    The string-match guard the issue wants removed was introduced in this still-open PR. Maintainers may want to address the concern directly in that PR review.

Related issues

No related issues found above the similarity threshold.