← Back to issue list

Loading the instance config should be more robust

View original Github issue

Metadata

Project
craft-providers
Number
#399
Type
issue
State
open
Author
mr-cal
Labels
Type: Enhancement
Created
Updated
Closed

Current evaluation

Enhancement to make InstanceConfiguration loading more robust by allowing extra fields or handling validation failures gracefully. Untriaged, 1085 days old, 0 comments.

Suggested action: needs triage

Reason: The issue has no maintainer comments, no assignee, and only the initial Type: Enhancement label after 1085 days. The referenced charmcraft issue #1258 was resolved by upgrading, not by fixing craft-providers. The code still has extra="forbid" on InstanceConfiguration (line 58), so the issue remains technically valid but untriaged.

Impact: 30 Quick Win: 22.5 Staleness: 75 Complexity: 25 Confidence: 65 Support Request: 0

Issue body

### What needs to get done Extra fields should probably be allowed in the [instance config](https://github.com/canonical/craft-providers/blob/c9ba62bd8f551c6486b1beaa46b1cf024018b005/craft_providers/instance_config.py#L52C11-L52C11). Or if the pydantic model fails, then the instance should be automatically cleaned. ### Why it needs to get done If a user creates a charm with charmcraft 2.4.1, the instance config will look like this: ``` compatibility-tag: charmcraft-buildd-base-v1.0 setup: true snaps: charmcraft: revision: "100" ``` If the user switches to charmcraft 2.2, config loading will fail because the `setup` tag is not in the pydantic model of the older version of craft-providers. Ironically, if craft-providers had been able to load the config, it would have seen the compatibility tag did not match and would have triggered an automatic cleaning. source: https://github.com/canonical/charmcraft/issues/1258

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 30
Quick Win: 22.5
Staleness: 75
Complexity: 25
Confidence: 65
Support Request: 0
needs triage Enhancement to make InstanceConfiguration loading more robust by allowing extra fields or handling validation failures gracefully. Untriaged, 1085 days old, 0 comments.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 20
Confidence: 80
Support Request: 5
close stale Enhancement to make instance config loading more robust by allowing extra fields or auto-cleaning on pydantic failure. Open for over two years with no maintainer comments or progress.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 40
Confidence: 75
Support Request: 10
keep open Enhancement to make instance config loading more robust by allowing extra fields or auto-cleaning on pydantic validation failure, preventing version mismatch crashes.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 20
Confidence: 70
Support Request: 0
needs triage Enhancement to make instance config loading more robust by allowing extra fields or auto-cleaning on failure. Open for nearly three years with no maintainer comments or assignee.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#1258 (confidence 90%)

    The issue body references this charmcraft issue as the source of the problem. It was closed after the user upgraded charmcraft, confirming the issue was version-related rather than a craft-providers bug.

Related issues

No related issues found above the similarity threshold.