samples
samples copied to clipboard
Builds fail with example builder images unless experimental image extension enabled
If I try a Pack build using Pack CLI 0.30.0 and pack build --builder cnbs/sample-builder:alpine ...
, I currently get the following error:
$ pack build example-basics --builder cnbs/sample-builder:alpine --trust-builder --buildpack packaged/x86_64-unknown-linux-musl/debug/libcnb-examples_basics --path examples/
alpine: Pulling from cnbs/sample-builder
...
Status: Downloaded newer image for cnbs/sample-stack-run:alpine
ERROR: failed to build: experimental features must be enabled when builder contains image extensions
eg: https://github.com/heroku/libcnb.rs/actions/runs/6113111959/job/16591949217?pr=668#step:10:119
I was wondering whether it might be best to move the experimental extension support to a different Docker image tag until Pack CLI can support it out of the box (without needing to enable non-default features).
(Originally discussed at: https://cloud-native.slack.com/archives/C033DV8D9FB/p1694119138551089)
What are the next steps for this? As far as I can tell, any end-users trying out the samples in this repo will have had a broken build for the alpine example since July. Whilst the alpine example probably isn't the first example people will try, it might still put some people off the project if the official examples don't work.
@edmorley We should now have experimental feature support in the latest pack
, see https://buildpacks.io/docs/tools/pack/cli/pack_config_experimental/. I can build samples with our alpine builder if I pack config experimental true
. We should add the experimental config to the Makefile
.
We also have plans to refactor our docs at https://github.com/buildpacks/rfcs/pull/296, which should hopefully see us documenting this better.
@AidanDelaney Thank you for the reply. I realise experimental mode can be enabled (see OP), this issue is about the examples not working out of the box (ie default configuration).
I need to do some samples work this week, I can look into this
Fixed in https://github.com/buildpacks/samples/commit/0a90553c5df3ef43754b3a788cbc6867829cd9e0
This still reproduces: https://github.com/heroku/libcnb.rs/actions/runs/6875118962/job/18698087762?pr=668#step:10:110
ERROR: failed to build: experimental features must be enabled when builder contains image extensions
Unless there is a way to configure the buildpack image to force Pack CLI to enable the experimental features, the experimental rebase features should not be used in these "hello world" type images, and instead demonstrated via other images IMO.
These samples are for basic getting started scenarios, and as-is they don't work out of the box.
I have yet to pick this up, but it's on my list...
Is this something that we can address by improving the docs? Right now you must enable experimental features for this sample to work.
There are two issues here:
- If a particular builder needs a particular experimental config option enabled for the builder to work, then the docs should mention this.
- IMO experimental features should not be used in the main "getting started" / demo type builders/samples (such as the alpine example), and instead should be their own builder/sample that demos just the experimental feature.
I filed this issue primarily about (2), so fixing (1) whilst useful in general would not resolve this issue.
ie: If you want a sample that shows how to use Dockerfiles extensions then it should be completely separate from other builders like the alpine example.
Hi! I am following the App developer guide. In the Specify buildpacks section, I was using the Pack CLI to specify which buildpacks are used during the build process, and I encountered the error:
ERROR: failed to build: experimental features must be enabled when the builder contains image extensions.
Initially, I thought I needed to enable experimental features in Docker. However, after receiving the same error again and discussing with @jjbustamante . I realized that the experimental feature had to be enabled in the Pack configuration. It might be a bit confusing for readers as it's not immediately clear that this experimental feature needs to be enabled in Pack.
This issue is relatable, so I believe we should address it.