← Back to issue list

Remove charmhub config from charmcraft.yaml spec

View original Github issue

Metadata

Project
charmcraft
Number
#2499
Type
pull request
State
open
Author
Copilot
Labels
Created
2025-12-03 18:31:11+00:00
Updated
2025-12-08 21:54:53+00:00
Closed

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.