Remove charmhub config from charmcraft.yaml spec
Metadata
Current evaluation
Removed charmhub config from charmcraft.yaml spec, added a validator to allow it only for legacy bases (ubuntu@24.04 or lower), and updated the JSON schema. Resolved in #2499.
Resolution: closed resolved
Reason: The PR implements the requested removal of the charmhub config, adds a validator for legacy bases, and updates the JSON schema. Commits were rebased and pushed to main in #2499.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Understand the codebase structure and test infrastructure
- [x] Add a constant for allowed charmhub bases (ubuntu@24.04 and lower, including almalinux@9)
- [x] Create validator in CharmcraftProject model to check if charmhub is used with valid bases
- [x] Update the JSON schema to remove charmhub field from the schema
- [x] Add comprehensive tests for the validator
- [x] Verify existing tests still pass
- [x] Run linting and formatting
- [x] Run broader test suite to ensure no regressions
- [x] Manual verification of charmhub validation behavior
- [x] Fix trailing whitespace issues from code review
- [x] Restore deprecation message for charmhub field
- [x] Remove unnecessary validation from BasesCharm (only needed for PlatformCharm)
- [x] Restore _warn_charmhub_deprecated method for proper deprecation warnings
- [x] Fix linting issues (removed unused import)
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Remove charmhub config from charmcraft.yaml spec</issue_title>
> <issue_description>### What needs to get done
>
> - [ ] Remove the ability to have a `charmhub` section in `charmcraft.yaml`
> - [ ] Remove the key from the `charmcraft.yaml` reference.
>
> ### Why it needs to get done
>
> This is no longer used in Charmcraft 3+, but needs to remain in existing bases in case folks use it.</issue_description>
>
> <agent_instructions>Create a validator for the project model for this that allows a `charmhub` top-level key if the charm only targets bases `ubuntu@24.04` or lower (including `almalinux@9`), but disallows it for any other bases. Ensure that the key is also removed from the JSON schema.</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
- Fixes canonical/charmcraft#1787
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Removed charmhub config from charmcraft.yaml spec, added a validator to allow it only for legacy bases (ubuntu@24.04 or lower), and updated the JSON schema. Resolved in #2499. | |
| stealth/space-bunny-alpha |
Impact:
44
Quick Win:
15
Complexity:
31
Confidence:
88
Actionability:
48
|
needs review | Rebased removal of charmhub from the generated schema while retaining legacy-base compatibility; targeted tests pass, but review, pending CI, and a title-policy failure remain. | |
| stealth/space-bunny-alpha |
Impact:
28
Quick Win:
9
Complexity:
30
Confidence:
72
Actionability:
48
|
needs review | Drops the deprecated `charmhub` key from the published charmcraft.yaml JSON schema (and model annotation) while keeping it accepted for legacy bases charms. Rebased on main 2 days ago; title-policy check fails and CI largely pending. | |
| stealth/space-bunny-alpha |
Impact:
47
Quick Win:
16
Complexity:
40
Confidence:
80
Actionability:
58
|
needs review | Removes deprecated charmhub config from the generated charmcraft schema while retaining conditional legacy-base compatibility; rebased and awaiting review, but title-policy CI fails and test/build checks remain pending. | |
| qwen/qwen3.6-35b-a3b |
Impact:
50
Quick Win:
9
Complexity:
40
Confidence:
70
Actionability:
30
|
needs review | Removes deprecated charmhub config from charmcraft.yaml spec with conditional validation. Has 7 unresolved review comments and some CI failures after recent rebase. | |
| qwen/qwen3.8-27b |
Impact:
40
Quick Win:
18
Staleness:
25
Complexity:
55
Confidence:
70
|
needs review | Copilot-agent PR removing the deprecated charmhub key from the charmcraft.yaml spec (validator allowing it only on ubuntu@24.04/almalinux@9 bases, schema removal, deprecation warning). Rebased onto main 60 days ago; 0 reviewers, 7 unresolved comments, several CI checks failing. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
45
Confidence:
85
|
needs review | Removes deprecated charmhub config from charmcraft.yaml spec, adds base validator, updates JSON schema, and includes tests. Currently rebased on main, awaiting maintainer review after recent CI and lint fixes. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
15
Complexity:
45
Confidence:
85
|
needs review | Removes deprecated charmhub config from charmcraft.yaml spec, adds bases-aware validation, updates JSON schema, and restores deprecation warnings. Rebased on main with maintainer feedback addressed; awaiting final review. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
10
Complexity:
45
Confidence:
85
|
needs review | Implements validator to restrict charmhub config to legacy bases, updates JSON schema, and handles deprecation warnings. Recently rebased on main per maintainer request and awaiting review. |
Update history
| Date | Change |
|---|---|
| closed | |
| updated |
Related work
-
Related To:
canonical/charmcraft#1787
(confidence 95%)
The PR body explicitly states it fixes this issue, which requested the removal of the charmhub config.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1787 Remove charmhub config from charmcraft.yaml spec | charmcraft | closed | Partially resolved: merged PR #2659 (0e45762b) removed charmhub from the reference; PR #2499 remains open to remove it from the generated spec. | |
| #1359 Deprecate charmhub config in charmcraft.yaml | charmcraft | closed | Resolved by merged PR #1828 (commit bf0b0751): the charmhub field in charmcraft.yaml is now marked deprecated and emits a warning pointing users to the store env vars. Removal from bases tracked separately in #1787. |