Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry plugin fails on 20.04 base #1996

Open
carlcsaposs-canonical opened this issue Nov 15, 2024 · 2 comments
Open

Poetry plugin fails on 20.04 base #1996

carlcsaposs-canonical opened this issue Nov 15, 2024 · 2 comments
Assignees
Labels
Bug Something isn't working triaged

Comments

@carlcsaposs-canonical
Copy link
Contributor

carlcsaposs-canonical commented Nov 15, 2024

Bug Description

Poetry plugin fails on 20.04 base, even if installing new version of poetry manually

To Reproduce

git clone https://github.com/canonical/pgbouncer-operator
cd pgbouncer-operator
git checkout 6b6a46ca48200dce2ad4fa9d11c3a8b63458cce1
charmcraft pack -v
Starting charmcraft, version 3.2.2.post75+gff00a899                                                                                                                                                                                                                               
Logging execution to '/home/ubuntu/.local/state/charmcraft/log/charmcraft-20241115-131317.698225.log'                                                                                                                                                                             
Launching managed ubuntu 20.04 instance...                                                                                                                                                                                                                                        
Creating instance from base instance                                                                                                                                                                                                                                              
Starting instance                                                                                                                                                                                                                                                                 
Starting charmcraft, version 3.2.2.post75+gff00a899                                                                                                                                                                                                                               
Logging execution to '/tmp/charmcraft.log'                                                                                                                                                                                                                                        
Starting charmcraft, version 3.2.2.post75+gff00a899                                                                                                                                                                                                                               
Logging execution to '/tmp/charmcraft.log'                                                                                                                                                                                                                                        
Initialising lifecycle                                                                                                                                                                                                                                                            
Installing build-packages                                                                                                                                                                                                                                                         
Cannot find package listed in 'build-packages': python3-poetry                                                                                                                                                                                                                    
Failed to execute charmcraft in instance.                                                                                                                                                                                                                                         
Full execution log: '/home/ubuntu/.local/state/charmcraft/log/charmcraft-20241115-131317.698225.log'   

Environment

Ubuntu 22.04

$ snap list
Name              Version                 Rev    Tracking            Publisher          Notes
charmcraft        3.2.2.post75+gff00a899  5394   3.x/edge            canonical✓         classic,held
core18            20240920                2846   latest/stable       canonical✓         base
core20            20240911                2434   latest/stable       canonical✓         base
core22            20241001                1663   latest/stable       canonical✓         base
juju              3.5.4                   28520  3/stable            canonical✓         -
lxd               5.0.3-80aeff7           29351  5.0/stable/…        canonical✓         -
microk8s          v1.29.9                 7227   1.29-strict/stable  canonical✓         -
snapd             2.63                    21759  latest/stable       canonical✓         snapd

charmcraft.yaml

# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.

type: charm
bases:
  - name: ubuntu
    channel: "20.04"
    architectures: [amd64]
  - name: ubuntu
    channel: "20.04"
    architectures: [arm64]
  - name: ubuntu
    channel: "22.04"
    architectures: [amd64]
  - name: ubuntu
    channel: "22.04"
    architectures: [arm64]

parts:
  poetry-deps:
    plugin: nil
    build-packages:
      - curl
    override-build: |
      python3 -m pip install --upgrade pip==24.3.1
      curl -sSL https://install.python-poetry.org | python3 - --version 1.8.4
      ln -sf $HOME/.local/bin/poetry /usr/local/bin/poetry
  foo:
    plugin: poetry
    source: .
    after:
      - poetry-deps
    poetry-with:
      - charm-libs
    build-snaps:
      - rustup
    build-packages:
      - libffi-dev
      - libssl-dev
      - pkg-config
    override-build: |
      rustup default stable
      craftctl default
  libpq:
    build-packages:
      - libpq-dev
    plugin: dump
    source: /usr/lib/
    source-type: local
    prime:
      - lib/
    organize:
      "*-linux-gnu/libpq.so*": lib/

Relevant log output

charmcraft-20241115-131317.698225.log

@lengau
Copy link
Collaborator

lengau commented Nov 15, 2024

Thanks for the report! I've made an upstream PR to fix this in craft-parts.

@lengau lengau self-assigned this Nov 15, 2024
@lengau lengau added the triaged label Nov 15, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3687.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

2 participants