← Back to issue list

Better error message for unsupported 24.04 base

View original Github issue

Metadata

Project
charmcraft
Number
#1991
Type
issue
State
open
Author
yanksyoon
Labels
—
Created
Updated
Closed
—

Current evaluation

Ubuntu 24.04 in deprecated bases syntax still triggers the cryptic "Base requires 'platforms' definition" model error; clearer service guidance is shadowed, leaving the request unresolved.

Suggested action: needs triage

Reason: Current BasesCharm validation still emits the reported wording in charmcraft/models/project.py, and its unit test explicitly expects that message. Although ProjectService contains clearer CraftError guidance, model validation rejects the project first. This is a valid, well-scoped UX fix, but the issue has no labels, maintainer response, or other triage signal.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 25 Complexity: 18 Confidence: 94 Actionability: 88

Issue body

### What needs to get done Create a model validator when using the to be deprecated `bases` model that raises helpful message. https://github.com/canonical/charmcraft/blob/ff00a899bb4bf203b18208e42ae1fbef12ccf238/charmcraft/models/project.py#L492 ### Why it needs to get done Currently the `charmcraft.yaml`, when using model.bases with 24.04, will error with ``` Bad charmcraft.yaml content: - base requires 'platforms' definition: {'name': 'ubuntu', 'channel': '24.04', 'architectures': ['amd64']} (in field 'bases[2]') ``` messaage. This is not a good UX. Many people have been raising duplicate questions regarding this cryptic errior on the Charmcraft matrix channel.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 25
Complexity: 18
Confidence: 94
Actionability: 88
needs triage Ubuntu 24.04 in deprecated bases syntax still triggers the cryptic "Base requires 'platforms' definition" model error; clearer service guidance is shadowed, leaving the request unresolved.
stealth/space-bunny-alpha
Impact: 42
Quick Win: 32
Complexity: 16
Confidence: 95
Actionability: 90
needs triage Unsupported 24.04 bases still trigger the cryptic “Base requires 'platforms' definition” error instead of migration guidance for the deprecated bases syntax.
qwen/qwen3.6-35b-a3b
Impact: 35
Quick Win: 22
Complexity: 20
Confidence: 75
Actionability: 80
keep open Improve cryptic error message when using deprecated 'bases' model with Ubuntu 24.04. Currently shows 'base requires platforms definition' which doesn't explain the deprecation or migration path.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 20
Staleness: 75
Complexity: 20
Confidence: 70
Support Request: 10
needs triage Request to improve the cryptic 'base requires platforms definition' error when using the deprecated bases model with 24.04. No maintainer response, no labels, 0 comments. The bases model is deprecated in favor of platforms.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 80
Support Request: 5
needs triage Request to add a model validator for the deprecated bases field in charmcraft.yaml to provide a clear error message when Ubuntu 24.04 is used, replacing the current cryptic error. Currently untriaged and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 85
Support Request: 10
needs triage Add a model validator for the deprecated bases model to provide a clear error for unsupported Ubuntu 24.04 bases, replacing the current cryptic platforms error. Currently untriaged and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 20
Confidence: 85
Support Request: 10
needs triage Request to add a model validator for the deprecated bases model to provide a clearer error message when Ubuntu 24.04 is used. Currently untriaged, unlabelled, and inactive with no maintainer engagement.

Update history

No update history recorded yet.

Related work

  • Caused By: charmcraft#1554 (confidence 90%)

    The platforms migration added the legacy-bases validation that emits the current generic error for non-legacy bases.

Related issues

No related issues found above the similarity threshold.