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

charmcraft 3.1.1 "successfully" packs charm, but python packages are missing in the venv #1781

Closed
ca-scribner opened this issue Aug 1, 2024 · 2 comments · Fixed by #1784
Closed
Assignees
Labels
Bug Something isn't working triaged

Comments

@ca-scribner
Copy link

ca-scribner commented Aug 1, 2024

Bug Description

Packing the grafana-agent charm in charmcraft 3.1.1 appears to complete successfully, but results in a charm that has packages missing in the charm's venv. Packing works fine in charmcraft 2.7.x

To Reproduce

# Download a "control" charm
juju download grafana-agent --channel latest/edge

# Pack something new to compare
git clone git@github.com:canonical/grafana-agent-operator.git
charmcraft pack

# inspect the .charm file's venv.  The newly packed charm will have a much emptier venv

Environment

ubuntu 24.04

charmcraft.yaml

charmcraft.yaml

Relevant log output

pastebin

@ca-scribner ca-scribner added the Bug Something isn't working label Aug 1, 2024
@lengau lengau added the triaged label Aug 2, 2024
Copy link

Thank you for reporting us your feedback!

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

This message was autogenerated

@lengau
Copy link
Collaborator

lengau commented Aug 2, 2024

Thanks for the report!

This looks like the grafana charm is depending on a bug in the older strict dependencies implementation, where it was installing all dependencies. Strict dependencies is supposed to require the entire dependencies tree. However, that fix didn't include running pip check to ensure that the venv doesn't have missing dependencies. I'll fix that.

@lengau lengau self-assigned this Aug 2, 2024
lengau added a commit that referenced this issue Aug 2, 2024
This runs `pip check` to ensure that all the packages in the charm
virtualenv have all of their required dependencies, failing the build
if they do not.

Fixes #1781
lengau added a commit that referenced this issue Aug 2, 2024
This runs `pip check` to ensure that all the packages in the charm
virtualenv have all of their required dependencies, failing the build
if they do not.

Fixes #1781
github-merge-queue bot pushed a commit that referenced this issue Aug 6, 2024
This runs `pip check` to ensure that all the packages in the charm
virtualenv have all of their required dependencies, failing the build if
they do not.

Fixes #1781
lengau added a commit that referenced this issue Aug 6, 2024
This runs `pip check` to ensure that all the packages in the charm
virtualenv have all of their required dependencies, failing the build if
they do not.

Fixes #1781
lengau added a commit that referenced this issue Aug 6, 2024
This runs `pip check` to ensure that all the packages in the charm
virtualenv have all of their required dependencies, failing the build if
they do not.

Fixes #1781
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

Successfully merging a pull request may close this issue.

2 participants