pack command succeeds without copying charm
Metadata
Current evaluation
Closed. The pack command failure stems from outdated setuptools and pip in the charm tool, tracked externally, and charmcraft failing to detect build errors, already resolved in version 2.1.
Suggested action: —
No scores available.
Issue body
Potentially related to #878
I'm working on a reactive charm. Recently, the `charmcraft pack` command has stopped working. This is the `charmcraft.yaml` file:
```yaml
type: "charm"
bases:
- build-on:
- name: "ubuntu"
channel: "20.04"
run-on:
- name: "ubuntu"
channel: "16.04"
- name: "ubuntu"
channel: "18.04"
- name: "ubuntu"
channel: "20.04"
parts:
charm:
source: .
plugin: reactive
build-snaps: [charm]
build-packages:
- virtualenv
- git
```
This is the `metadata.yaml` file:
```yaml
name: jenkins
display-name: Jenkins
docs: https://discourse.charmhub.io/t/jenkins-docs-index/4831
summary: Jenkins Continuous Integration Server
maintainers:
- IS SRE <launchpad.net/~canonical-is-sre>
description: >
Jenkins is an extendable open source continuous integration server that
monitors executions of repeated jobs. The focus of Jenkins is the
building/testing of software project continuously, and monitoring executions
of externally-run jobs. More information at http://jenkins-ci.org/.
This charm provides the Jenkins master service, and when paired with the
jenkins-slave charm provides an easy way to deploy Jenkins on Ubuntu server,
and scale out Jenkins slaves.
tags:
- application_development
- ops
subordinate: false
series:
- xenial
- bionic
- focal
provides:
website:
interface: http
extension:
interface: jenkins-extension
scope: container
optional: true
nrpe-external-master:
interface: nrpe-external-master
scope: container
requires:
master:
interface: jenkins-slave
optional: true
zuul:
interface: zuul
optional: true
storage:
jenkins:
type: filesystem
description: Jenkins data.
location: /srv/mnt/jenkins
```
This is the log of the build where it seems that the installation of `Jinja2` fails because `markupsafe` is not installed: https://pastebin.canonical.com/p/xgKbsnvrwN/
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. The pack command failure stems from outdated setuptools and pip in the charm tool, tracked externally, and charmcraft failing to detect build errors, already resolved in version 2.1. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as resolved. The silent success bug was fixed in charmcraft 2.1. The underlying Jinja2 build failure stems from outdated setuptools in Focal and is tracked in upstream charm-tools. Upgrade charmcraft and monitor upstream. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. The packaging failure stems from outdated Jinja2 dependencies in the charm tool, tracked separately, while charmcraft's failure to detect the error was already fixed in version 2.1. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. The charmcraft failure detection bug was fixed in v2.1. The charm tool build failure is tracked separately in charm-tools. Resolved by closing as the charmcraft side is addressed. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #922 Unable to pack charms on a GCP instance | charmcraft | closed | Closed as not a Charmcraft bug. The error stems from a pip and setuptools version mismatch. Maintainers provided a workaround: adding setuptools to charm-python-packages in charmcraft.yaml to force an update and resolve the build failure. | |
| #501 charmcraft pack fails trying to include a non-existing charm/src/.tox/ | charmcraft | closed | charmcraft pack failed when copying non-existent build directories or files. Users worked around it with charmcraft clean. The issue was closed as fixed upstream in the underlying parts lifecycle code. | |
| #1931 Successfully pack charm with incorrect charm.py file permission | charmcraft | open | charmcraft pack succeeds even when src/charm.py lacks the execute bit, producing a charm that fails at deploy with 'Permission denied'. Requested a warning/error or auto-fix at pack time. No maintainer activity; an entrypoint linter now exists but only runs via charmcraft analyze, not pack. | |
| #1930 `charmcraft pack -o` fails: `FileNotFoundError` | charmcraft | closed | A FileNotFoundError with charmcraft pack -o was abandoned and closed without resolution. No fix was implemented, and a recent comment confirms the bug persists. |