← 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
Updated
Closed

Current evaluation

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.

Suggested action: needs review

Reason: The PR was actively rebased onto main 60 days ago (commit f01fc4d per Copilot's 2026-07-02 reply to @lengau's rebase request) and the target issue #1787 is still open, so it is not stale and not superseded. However it has 0 reviewers, 7 unresolved review comments, and failing CI (snap-tests on ubuntu-25.10/26.04, snap-store-tests, OSV-scanner, Conventional Commits title check, lint/files), so it needs a maintainer review before landing.

Impact: 40 Quick Win: 18.0 Staleness: 25 Complexity: 55 Confidence: 70

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.8-27b
Impact: 40
Quick Win: 18.0
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 40
Confidence: 85
needs review Removes deprecated charmhub config from charmcraft.yaml spec and JSON schema. Adds validator allowing it only for legacy bases. Implementation complete, linting resolved, and deprecation warnings restored. Awaiting review and merge.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: charmcraft#1787 (confidence 85%)

    PR body explicitly states 'Fixes canonical/charmcraft#1787' (Remove charmhub config from charmcraft.yaml spec), which is still open.

  • Related To: charmcraft#1359 (confidence 75%)

    Earlier issue 'Deprecate charmhub config in charmcraft.yaml' (closed as deferred) is the deprecation step this removal PR builds on; PR restores the deprecation warning path from #1828.

Related issues

Issue Project State Summary Similarity
#1787 Remove charmhub config from charmcraft.yaml spec charmcraft closed Closed without implementation. The deprecated charmhub configuration was not removed from the spec, indicating the task was abandoned or superseded.
80%
#1359 Deprecate charmhub config in charmcraft.yaml charmcraft closed Superseded and deferred to Charmcraft 3.x. The charmhub config deprecation notice remains pending, while PR #1787 addresses removal from future bases.
79%
#2659 docs: remove charmhub config charmcraft merged Merged into main. Documentation references to charmhub were removed while keeping the underlying code intact for backward compatibility. Closes issue 1787 after reviewer approval and CI validation.
75%
#1828 feat: mark charmhub parameter as deprecated charmcraft merged Successfully merged, marking the charmhub parameter as deprecated and resolving issue #1359. Approved by two reviewers, the update modifies four files to implement the deprecation warning.
71%