← Back to issue list

Charmcraft (2.0.0) pack with build-packages failing on GitHub actions (but 2.1.0 - latest/candidate - is working)

View original Github issue

Metadata

Project
charmcraft
Number
#883
Type
issue
State
closed
Author
marceloneppel
Labels
—
Created
Updated
Closed

Current evaluation

Charmcraft 2.0.0 failed to install build packages after a GitHub runner update; running apt-get update worked. Maintainers closed it as likely unrelated to Charmcraft.

Resolution: closed not a bug

Reason: In the closing comment on 2022-10-06, facundobatista noted that Charmcraft made no related change and suspected a Craft Providers update. The reporter confirmed that running apt-get update worked; 2.1.0 was released by PR #880.

Evaluated by: mr-cal-bot

No scores available.

Issue body

# Issue Hi Charmcraft team! This is kind of a report of a possible bug on 2.0.0 (latest/stable), but that seems to be working fine on 2.1.0 (latest/candidate). My intention Is just to let you know about that, because I could't find anything related to that in the [release notes for 2.1.0](https://github.com/canonical/charmcraft/releases/tag/2.1.0). To be fair, it seems to be probably a bug related to the combination of Charmcraft 2.0.0 and `GitHub Actions Runner` version 2.297.0 and image version 20220922.2 (because Charmcraft 2.0.0 was working correctly with the previous runner and image versions some days ago: 2.296.2 and 20220920.2, respectively). The error happens when we try to provide a package, like `rustc`, on the `build-packages` section of `charmcraft.yaml`: ```yaml parts: charm: build-packages: - rustc ``` And later we try to run `charmcraft pack --destructive-mode --quiet`, the same way is done in some charming actions, like [upload-charm](https://github.com/canonical/charming-actions/blob/8a1577624eb7726de8b8c95b31be31eb1a1813d5/src/actions/upload-charm/upload-charm.ts#L52). Then we face the following error: ```sh Run /usr/bin/sudo charmcraft pack --destructive-mode --quiet [2](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:2) /usr/bin/sudo charmcraft pack --destructive-mode --quiet [3](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:3) shell: /usr/bin/bash -e {0} [4](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:5) Parts processing error: Cannot install all requested build packages: libstd-rust-1.59=1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2, libstd-rust-dev=1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2, rustc=1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2 [5](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:6) Full execution log: '/root/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20221001-173515.282450.log' [6](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:7) Error: Process completed with exit code 1. ``` [This](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165529657/jobs/5154626398) is a successful action run using latest/candidate and [this](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422) is a failed job using latest/stable. The intention of this issue is to let you know about that and maybe take some action if it is needed, as it seems that 2.1.0 solves the problem and I hope it will land stable soon. I could't get more details about the reason 2.0.0 worked before and doesn't work anymore, or the difference between the two versions when running in the new GitHub Actions Runner version, but I can take a look later if it helps on something.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Charmcraft 2.0.0 failed to install build packages after a GitHub runner update; running apt-get update worked. Maintainers closed it as likely unrelated to Charmcraft.
stealth/space-bunny-alpha — closed not a bug Build-package install failures on Charmcraft 2.0.0 in GitHub Actions weren't a Charmcraft bug; facundobatista attributed it to a craft-providers update and closed the report.
stealth/space-bunny-alpha — closed not a bug Charmcraft 2.0.0 failed to install build packages on a newly updated GitHub runner, while 2.1.0 worked; it was closed as not a Charmcraft bug after a Craft Providers update.
stealth/space-bunny-alpha — closed not a bug Closed as not a Charmcraft bug; an updated Craft Providers library and GitHub runner changes were identified as likely causes. Charmcraft 2.1.0 worked, and apt-get update was a workaround.
qwen3.6-35b-a3b-mtp-q6 — — Closed as not a Charmcraft bug. The build-packages failure on updated GitHub Actions runners was attributed to an underlying Craft Providers library update. A manual apt-get update workaround exists, and version 2.1.0 resolves the issue.
qwen/qwen3.6-35b-a3b — — Charmcraft 2.0.0 build-packages failed on GitHub Actions due to package resolution errors. Upgrading to 2.1.0 resolved the issue, attributed to an updated Craft Providers library. The maintainer closed the report as fixed.
qwen3.6-35b-a3b-mtp-q6 — — Closed. Attributed to an upstream Craft Providers library update causing package resolution failures on GitHub Actions. Charmcraft 2.1.0 candidate resolves the issue, and running apt-get update manually provides a workaround.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#880 (confidence 90%)

    Release PR merged as b9b07c3b; 2.1.0 was the candidate version reported working, although no dedicated fix was cited.

Related issues

Issue Project State Summary Similarity
#511 `charmcraft pack` fails running `apt update` charmcraft closed Closed with no Charmcraft code change: maintainers determined the `apt update` failure came from a broken host/LXD (fan bridge) networking setup, not a Charmcraft bug; guidance posted to Charmhub Discourse and the LXD forum.
73%
#55 `charmcraft build` breaks when pip packages come from github charmcraft closed GitHub requirements now work in snap-packaged Charmcraft 0.2, which added preliminary git support; the reporter confirmed the fix. Released via PR #58.
71%
#605 Charmcraft fails to build due to lack of Git charmcraft closed Resolved as a build-environment configuration issue: the reporter fixed the failure by adding git to parts.charm.build-packages in charmcraft.yaml.
71%
#749 Charmcraft pack crashed with `cannot install all requested build packages` charmcraft closed Transient Ubuntu archive outage (HTTP 404 fetching zlib1g_1.2.11) made apt fail inside the build container; retry after `charmcraft clean` succeeded. Maintainer facundobatista closed it as out of charmcraft's control, asking for recurring logs.
70%