← Back to issue list

pack command succeeds without copying charm

View original Github issue

Metadata

Project
charmcraft
Number
#879
Type
issue
State
closed
Author
jdkandersson
Labels
—
Created
Updated
Closed

Current evaluation

Charmcraft 2.1 fixed false pack success after charm failed in canonical/charmcraft#804 via PR #869 (7046f61d); the remaining Jinja2 failure is tracked in juju/charm-tools#646.

Resolution: closed resolved

Reason: PR #869, commit 7046f61d, fixed the reactive plugin to reject invalid charm command return codes, closing #804 in Charmcraft 2.1. The separate Jinja2/setuptools failure remained tracked in juju/charm-tools#646 and could not be corrected by Charmcraft externally.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Charmcraft 2.1 fixed false pack success after charm failed in canonical/charmcraft#804 via PR #869 (7046f61d); the remaining Jinja2 failure is tracked in juju/charm-tools#646.
stealth/space-bunny-alpha — closed not a bug Closed by facundobatastava (2022-10-10) as two root causes: a Focal Jinja2/MarkupSafe charm install failure tracked in juju/charm-tools#646, and the silent-success bug already fixed in 2.1 via commit 7046f61d (#804).
stealth/space-bunny-alpha — closed superseded Maintainer closed it citing two causes: charmcraft's missing charm-failure detection was fixed in 2.1 via #804 (PR #869, commit 7046f61d); the real Jinja2/markupsafe failure is tracked in juju/charm-tools#646.
stealth/space-bunny-alpha — closed resolved Charmcraft’s silent-success bug was fixed in 2.1 by commit 7046f61d (#804). The underlying Focal Jinja2/MarkupSafe failure remains tracked in juju/charm-tools#646.
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.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#804 (confidence 100%)

    Directly tracked the bug where failed charm invocations were not detected.

  • Likely Fixed By: canonical/charmcraft#869 (confidence 100%)

    Merged fix in commit 7046f61d for reactive-plugin charm return-code handling.

  • Blocked By: charm-tools#646 (confidence 99%)

    Tracked the underlying Jinja2 installation failure caused by Focal's setuptools and pip versions.

  • Related To: canonical/charmcraft#878 (confidence 70%)

    The reporter identified it as potentially related, but the closing diagnosis cited #804 and juju/charm-tools#646 instead.

Related issues

Issue Project State Summary Similarity
#1931 Successfully pack charm with incorrect charm.py file permission charmcraft open Packing accepts a non-executable src/charm.py, causing Juju to fail at deploy. The report has a clear reproducer but no maintainer triage or recorded fix.
74%