-
Notifications
You must be signed in to change notification settings - Fork 73
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
charm-python-packages
does not guarantee these packages are installed before packages in requirements.txt
#1664
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2848.
|
Another way in which this issue could be reproduced is by running
|
This is still a problem for us, even after a latest revision of charmcraft We see the exact same errors that come from |
I've also tried to use the This time though I see different kinds of errors (in all tests that try to build charms)
|
Some more context on the error above:
Also if I'd run locally the command |
I tried to remove
|
Thanks! I missed de-duplicating the values in the charmlibs: #1750 |
Thanks for the update @lengau! We tried also with canonical/istio-operators#476
|
The main difference in the repo that succeeds canonical/kfp-operators#393 and in a repo that fails canonical/istio-operators#476 is that in the succeeding case we have this code: parts:
charm:
charm-python-packages: [setuptools, pip] # Fixes install of some packages
# Install jinja2 (a dependency of charmed-kubeflow-chisme) from binary to avoid build-time issues
# See https://github.com/canonical/bundle-kubeflow/issues/883
# Remove when https://github.com/canonical/charmcraft/issues/1664 is fixed
charm-binary-python-packages: [jinja2] While in the failing case we have this code: parts:
charm:
charm-python-packages: [setuptools, pip, jsonschema, cryptography, cffi]
build-packages: [git, rustc, cargo, libffi-dev, libssl-dev, pkg-config] So in the succeeding case, we have defined |
@kimwnasptd maybe you want to take a look at #1135 (comment) |
@DnPlas I believe this was fixed in Charmcraft 3.2 - can you confirm? |
Bug Description
I have noticed that the list of packages in
charm-python-packages
may not guarantee they will be installed before charm requirements, as the docs suggest.The behaviour I am getting is that the packages listed in
charm-python-packages
get collected and it looks like they are being installed as the very first thing, for example:but in reality they get installed after collecting all packages, including the ones listed in
requirements.txt
.This could result in errors if any of the charm requirements depends on a
charm-python-package
to be installed (or upgraded) a priori.Please NOTE I concluded this was an issue after trying to solve this other issue with the suggestions from this post. Upgrading
setuptools
fixes the issue withmarkupsafe
andjinja2
, I tested it in a virtual env, but it was not possible in the charm.To Reproduce
charmcraft pack -v
setuptools
andpip
packages get actually installed and upgraded.Environment
charmcraft.yaml
Relevant log output
Logs: https://pastebin.canonical.com/p/DhpBRNn7pz/
The text was updated successfully, but these errors were encountered: