← Back to issue list

Charmcraft pack cannot run in a CI?

View original Github issue

Metadata

Project
charmcraft
Number
#388
Type
issue
State
closed
Author
heitorPB
Labels
Created
Updated
Closed

Current evaluation

CI build failures were resolved by switching to the charmcraft classic snap on the edge channel, bypassing strict confinement restrictions. The issue was closed after the user confirmed the workaround fixed the build process.

Suggested action:

No scores available.

Issue body

Hello, we have a GitHub actions CI to build and deploy our slurm-charms (https://github.com/omnivector-solutions/slurm-charms/blob/CI/.github/workflows/test_build_release_edge.yaml#L60). But charmcraft is now crashing when running in github CI. We install it from the snap (latest/stable), and our CI also has python3/pip3 installed. These are the last commands before crashing (`make charms` invoke `charmcraft pack`): ```bash Run make charms make charms echo "charm version: $(cat version)" shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.9.5/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.5/x64/lib Executing ['pip3', 'install', '--target=/home/runner/work/slurm-charms/slurm-charms/charm-slurmd/build/venv', '--requirement=/home/runner/work/slurm-charms/slurm-charms/charm-slurmd/requirements.txt'] failed with return code 1 problems installing dependencies (full execution logs in /home/runner/snap/charmcraft/common/charmcraft-log-x84lc565) make: *** [Makefile:32: slurmd] Error 1 Error: Process completed with exit code 2. ``` Can someone help me understand what is going on here?

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 CI build failures were resolved by switching to the charmcraft classic snap on the edge channel, bypassing strict confinement restrictions. The issue was closed after the user confirmed the workaround fixed the build process.
qwen/qwen3.6-35b-a3b Resolved by switching to the charmcraft edge snap with classic confinement. Strict confinement was blocking access to /etc/gitconfig during pip dependency installation in CI.
qwen/qwen3.6-35b-a3b Resolved by switching to the charmcraft classic snap from the edge channel. The stable snap's strict confinement blocked required file access, causing pack to fail in CI. Issue closed as fixed.
qwen3.6-35b-a3b-mtp-q6 CI build failures stemmed from strict snap confinement blocking /etc/gitconfig access. Switching to the classic charmcraft snap from the edge channel resolved the issue.
qwen3.6-35b-a3b-mtp-q6 CI build failures stemmed from strict snap confinement blocking /etc/gitconfig access. Switching to the classic charmcraft snap from the edge channel resolved the issue, allowing successful dependency installation and charm packing.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#646 Failed to inject host Charmcraft snap into target environment charmcraft closed Closed. Maintainer confirmed the issue is resolved in recent Charmcraft versions and cannot be reproduced. A user workaround suggested running charmcraft clean --verbose prior to building.
74%
#184 Charmcraft crash when snap is used in /tmp directory charmcraft closed Charmcraft crashed with a permission error when run from /tmp due to strict snap confinement. The issue was resolved by switching to classic confinement mode, which removed the restriction. Closed as fixed.
74%
#1767 Charmcraft pack does not work when updating to 3.1.1 on osx charmcraft closed Fixed in pull request #1823. The update resolved a snap injection bug that incorrectly attempted to inject the host charmcraft snap on macOS, restoring successful builds after the 3.1.1 upgrade.
72%
#560 Charmcraft pack is giving error frequently charmcraft closed Charmcraft pack failed due to an apt-get network error installing snapd in an LXD container. Maintainers linked it to a known networking issue. The reporter confirmed a workaround failed. Closed without a code fix, likely abandoned.
72%
#2031 ci: use charmcraft from the store for weekly spread runs charmcraft merged Merged a CI update that switches weekly spread runs to pull charmcraft from the store instead of building a snap. This saves build time as edge sync delays are rare. Approved by two reviewers and passed all checks.
72%
#1104 charmcraft pack on Ubuntu 23.04 (Lunar) fails. charmcraft closed Charmcraft pack failed on Ubuntu 23.04 due to unavailable build environments. PR #1130 addressed the issue but was blocked by an external cloud-images bug. The issue was closed pending upstream resolution.
71%
#380 Charmcraft cannot build or pack from tmp dirs created with tempfile.mkdtemp charmcraft closed Fixed. Charmcraft failed to pack from tempfile.mkdtemp directories due to snap confinement mount namespace restrictions. The issue was resolved when Charmcraft transitioned to classic confinement in v1.0.0, eliminating the path resolution problem.
70%