Remove charmhub config from charmcraft.yaml spec
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
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
No evaluation history available.