← Back to issue list

Incorrect information in Charmhub for ARM64 variants of a charm

View original Github issue

Metadata

Project
charmcraft
Number
#1853
Type
issue
State
closed
Author
jameinel
Labels
Created
Updated
Closed

Current evaluation

Closed. Manifests incorrectly included all architectures instead of the specific build architecture due to a charmcraft bug. Resolved in charmcraft 3.1.2+; re-packaging charms generates correct manifests.

Suggested action:

No scores available.

Issue body

### Bug Description As filed in https://bugs.launchpad.net/snapstore-server/+bug/2060271 the `github-runner` charm has both AMD64 and ARM64 builds. In particular rev 234 is an amd64 build, and 235 is an arm64 build. When Juju goes to query charmhub, it gets a response that indicates that rev 234 supports both amd64 and arm64. I don't know whether this was a bug in how the data got recorded to charmhub (eg a charmcraft bug), or in how charmhub is using the information it currently has. But across Juju, Charmhub, and Charmcraft we definitely have a bug around how the data is getting stored and then retrieved. ### To Reproduce See bug 2060271, but: ``` juju --debug --logging-config "#charmhub=TRACE" download --arch arm64 github-runner --channel latest/beta ``` You can see that the response from Charmhub is saying: ``` "bases": [ { "architecture": "amd64", "channel": "22.04", "name": "ubuntu" }, { "architecture": "arm64", "channel": "22.04", "name": "ubuntu" } ], ... "resources": [], "revision": 234, "summary": "Creates a group of self-hosted github runners.", "type": "charm", "version": "234" ``` However, revision 234 only supports amd64. (The revision 235 was the one that supported arm64.) ### Environment One plausible explanation is that during upload of the arm64 build, something was incorrectly recorded in charmhub that made it think that rev 234 also supported arm. ### charmcraft.yaml ```shell # Copyright 2024 Canonical Ltd. # See LICENSE file for licensing details. type: charm parts: charm: charm-python-packages: - setuptools # for jinja2 build-packages: - git # for installing git source of pylxd - libffi-dev # for cffi - libssl-dev # for cryptography - rust-all # for cryptography - pkg-config # for cryptography scripts: plugin: dump source: scripts organize: build-lxd-image.sh: scripts/build-lxd-image.sh reactive_runner.py: scripts/reactive_runner.py repo_policy_compliance_service.py: scripts/repo_policy_compliance_service.py prime: - scripts/ bases: - build-on: - name: "ubuntu" channel: "22.04" architectures: - amd64 run-on: - name: "ubuntu" channel: "22.04" architectures: - amd64 - build-on: - name: "ubuntu" channel: "22.04" architectures: - arm64 run-on: - name: "ubuntu" channel: "22.04" architectures: - arm64 ``` ### Relevant log output ```shell I don't believe there is a relevant log for charmcraft. ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed. Manifests incorrectly included all architectures instead of the specific build architecture due to a charmcraft bug. Resolved in charmcraft 3.1.2+; re-packaging charms generates correct manifests.
qwen/qwen3.6-35b-a3b Resolved as charmcraft bug #1783. Manifests incorrectly included all architectures instead of the specific build architecture. Re-packaging with charmcraft 3.1.2 or newer generates correct manifests and fixes the issue.
qwen/qwen3.6-35b-a3b Closed. Resolved as charmcraft bug #1783. Manifests incorrectly included all architectures instead of the specific build architecture. Re-packaging charms with charmcraft 3.1.2 or newer generates correct architecture-specific manifests.
qwen3.6-35b-a3b-mtp-q6 Fixed via charmcraft #1783. Manifests incorrectly listed all architectures instead of the specific build architecture. Repackaging with charmcraft 3.1.2+ generates correct manifests, resolving the incorrect Charmhub data.
qwen3.6-35b-a3b-mtp-q6 Charmhub incorrectly reported multi-architecture support for a single revision due to charmcraft bug #1783. The manifest generation flaw was fixed in charmcraft 3.1.2. Repackaging charms with the updated version corrects the architecture metadata.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1697 Charmcraft 3 breaks charms with multiple run-on architectures charmcraft closed Closed as blocked by an upstream fix in craft-application. Charmcraft 3 incorrectly concatenated multiple run-on architectures into a single invalid string, causing build failures. Resolution awaits the referenced upstream issue.
73%
#1783 Charmcraft 3 no longer respects legacy bases architectures charmcraft closed Fixed in 3.1.2. Charmcraft 3 ignored legacy bases architectures, defaulting to amd64. The bug stemmed from metadata generation failing to apply the current build plan to legacy definitions. The update restores correct architecture detection.
72%
#1400 fix: always include architectures in charm manifest charmcraft merged Merged a fix to always include architectures in the charm manifest. Approved by three reviewers, the change updates nine files with 26 additions and 14 deletions, resolving the manifest generation issue.
72%