-
Notifications
You must be signed in to change notification settings - Fork 75
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
Feature request: Option to disable no-binary
pip option for non-production builds
#1115
Comments
no-binary
pip option for non-production buildsno-binary
pip option for non-production builds
Can you give more details about your workflow? I can see the first build taking a long time, but for iteration even with |
This is for first builds—on CI or new VMs or after updating something that requires a |
Quick note while I'm thinking about this: the resulting charm should probably get a flag that makes it un-publishable in the store (or at very minimum not to a stable track — maybe similar to snapcraft's |
Apart from CI, this is also a pain when using a VM for charm development. There is a growing interest in (ab)using
Why not? What's the difference between a charm packed in those two different ways? |
Any plans to do this? It would really streamline a development a lot. Also, I tend to see charm-binary-python-packages in most charm repos these days. This is presumably not what we want and I think people would stop if they could build more quickly. |
This isn't on the current cycle roadmap. However, the new cross-container caching should help alleviate this a bit. On Linux, this cache is stored in |
This isn't something we should implement, and I think this issue should be closed. The global cache feature that Alex mentioned should really help a lot here, and should get build times down to the same as if you were consuming a binary wheel from PyPI after the first run. @sergiusens / @lengau we should add an entry to the Charmcraft docs on juju.is that explains how to wire the cache up to Github Actions if we haven't already :) |
Per Jon's comment above I'm marking this as not planned. We've got a task for the documentation, and @carlcsaposs-canonical has an excellent workshop on improving CI for charmcraft. Notwithstanding bugs in the caching process, I believe the feature can help with most of the underlying situations that make this feature desirable. (Mounting that cache directory from a non-ephemeral location should work for CI and virtual machines.) |
charmcraftcache helps alleviate this issue (and simplifies "how to wire the cache up to Github Actions" [while also speeding up non-CI builds]) |
I am sympathetic to why we require binaries be built locally for a charm that is being published, but the approach we're taking to enforce this is not working. This is visible from how several teams have implemented workarounds to reduce their CI build times (some use A
charmcraft.yaml's If we're worried about people abusing this feature and publishing charms with binaries they did not build, have charmcraft write metadata that charmhub inspects to reject charms with public binaries |
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2866.
|
to clarify, all data platform repos & repos using charmcraftcache (to my knowledge) respect the requirement you mentioned:
(we use charmcraftcache for integration test builds, but not for release builds) this does have the unfortunate side effect that the charm we release is not the charm that we test with |
What needs to get done
Add
charmcraft pack
option to disable--no-binary
pip optioncharmcraft/charmcraft/charm_builder.py
Line 262 in 850a77a
Why it needs to get done
Installing Python packages from source can take up to an hour for charms with a lot of dependencies
Moving the dependencies from
requirements.txt
tocharm-binary-python-packages
decreasescharmcraft pack
time to a couple of minutesFor production builds, installing Python packages from source is desirable. However, for non-production development builds, this can significantly slow down iteration speed.
The text was updated successfully, but these errors were encountered: