← Back to issue list

Support patching older major version of charm libraries

View original Github issue

Metadata

Project
charmcraft
Number
#1020
Type
issue
State
closed
Author
gruyaume
Labels
—
Created
Updated
Closed

Current evaluation

Charmhub’s backend was updated to allow parallel charm-library major versions and their patch upgrades, resolving the publishing limitation reported in charmcraft#1020.

Resolution: closed resolved

Reason: The fix was delivered by the backend API tracked in snapstore-server#2024370. Maintainer @maxiberta confirmed that upgrades such as 0.3→0.4, 1.12→1.13, and 2.0→2.1/3.0 are now accepted simultaneously.

Evaluated by: mr-cal-bot

No scores available.

Issue body

**OVERVIEW** `charmcraft publish-lib` doesn't allow to patch a major version of a library that is not the most recent. It would be reasonable and expected to be able to patch a charm library. For example, the [`tls-certificates-interface`](https://github.com/canonical/tls-certificates-interface/pull/30) has the following versions of a charm library published: - 0.3 - 1.12 - 2.0 I would like to update lib v1 with a bug fix but it is impossible to publish to `1.13`. We are getting the following error: ``` The library tls_certificates has a wrong LIBAPI number, it's too high, Charmhub highest version is 2.0. ``` This is particularly important because major versions mean API and/or behaviour change. In cases where charms are already using a version of a library and there's a bug with it, we don't want to ask their authors to refactor their charm to use the newest major version, we'd want them to simply fetch the latest patch . Taken from a discussion on this subject with @Roadmaster and @facundobatista ``` if the latest you uploaded is v2.0, then the rules I see here are: you need to either push v2.1, or v3.0; pushing 1.13 is not going to work because 2.0 made that obsolete/deprecated from charmlibs point of view. This looks at the "tip" to determine what can come next; the tip is the highest from the list of revisions ordered by api and patch ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Charmhub’s backend was updated to allow parallel charm-library major versions and their patch upgrades, resolving the publishing limitation reported in charmcraft#1020.
stealth/space-bunny-alpha — closed resolved Resolved after Charmhub’s backend began allowing parallel major versions; Charmcraft PR #1198 (commit 154bf5d6) added coverage for multiple-version library updates.
stealth/space-bunny-alpha — closed resolved Charmhub’s backend API was updated to allow parallel library versions, so patches to older major versions are now accepted alongside newer releases.
qwen3.6-35b-a3b-mtp-q6 — — Resolved by updating the backend API service to allow parallel version upgrades. Users can now patch older major library versions alongside newer ones without version conflict errors.
qwen/qwen3.6-35b-a3b — — Backend API service update now allows patching older major versions of charm libraries simultaneously. The original restriction preventing patches on non-tip versions was resolved, closing the request.
qwen3.6-35b-a3b-mtp-q6 — — Backend API service updated to allow patching older major versions of charm libraries. The restriction preventing independent patch releases, such as 1.12 to 1.13 alongside 2.0, has been resolved.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapstore-server#2024370 (confidence 98%)

    The reporter linked this backend bug, whose resolution enabled publishing patches to older major library versions.

Related issues

Issue Project State Summary Similarity
#295 Update charm library template for correct command to publish or update libraries charmcraft merged Merged PR #295 updated the charm library template to use charmcraft publish-lib instead of the nonexistent push-lib command (commit 0461b2be).
71%
#1198 tests: add charm library multiple versions update test charmcraft merged Merged PR #1198 (commit 154bf5d6) added a 120-line regression test covering updates across multiple charm-library versions, linked to #1020/CRAFT-1916.
71%