paketo-buildpacks / ruby

Apache License 2.0
17 stars 8 forks source link

Build breaking with ruby build pack after the recent version bumps #1006

Open pbrumm opened 1 year ago

pbrumm commented 1 year ago

Expected Behavior

build worked as of Sept 12 11am central

Current Behavior

ERROR: failed to build: failed to write image to the following tags: [pack.local/builder/75647075726175716f69:latest: loading image "pack.local/builder/75647075726175716f69:latest". first error: embedded daemon response: max depth exceeded]

I can reproduce on latest pack-cli locally and in the cloud deploy.

I am not versioning any of the libraries in the project.toml file and that error in the past has been due to something getting mixed up in the version upgrades.

full: Pulling from paketobuildpacks/builder
Digest: sha256:11068838eeb5cb3a34bb34f56de5e9a5c40c1eb31995046e3076ebde7b499c9f
Status: Image is up to date for paketobuildpacks/builder:full
full-cnb: Pulling from paketobuildpacks/run
Digest: sha256:5373ba74412664ac24f132e29b94808467d8522e5f79557d5aea72571c15e7fe
Status: Image is up to date for paketobuildpacks/run:full-cnb
latest: Pulling from paketo-buildpacks/nodejs
Digest: sha256:8de349621dfa7e6e7bd3e3deda5943c30a8ac678127551845fe00d16a9b7d195
Status: Image is up to date for gcr.io/paketo-buildpacks/nodejs:latest
latest: Pulling from paketo-buildpacks/node-engine
Digest: sha256:63a7e6bffefcb2a49461ab65554012a4e3f39a9bb0e5f7c4d41a275ffb8bc6a9
Status: Image is up to date for gcr.io/paketo-buildpacks/node-engine:latest
latest: Pulling from paketo-buildpacks/ruby
Digest: sha256:6358ad8d6020e491cc74aec78aba215766ad0bacfafc89425fbe3080da101f4a
Status: Image is up to date for gcr.io/paketo-buildpacks/ruby:latest
latest: Pulling from paketo-buildpacks/environment-variables
Digest: sha256:70611b1791d007eee8d71c514a2e41c9b23e4cee7e07deb1979c9b609cb3b733
Status: Image is up to date for gcr.io/paketo-buildpacks/environment-variables:latest
ERROR: failed to build: failed to write image to the following tags: [pack.local/builder/716664616e616d776578:latest: loading image "pack.local/builder/716664616e616d776578:latest". first error: embedded daemon response: max depth exceeded]
robdimsdale commented 1 year ago

@pbrumm can you share the exact command you're running? The likely issue here is that you're adding some additional buildpack or something that's contributing to the layer limit and ultimately pushing it over the 127 limit imposed by docker.

Unfortunately there's no elegant way around this. If you know the specific buildpacks you want ahead of time, you can switch to the buildpackless builder and manually add the buildpacks you need via pack build -b <buildpack>

pbrumm commented 1 year ago

I got past it by rolling back to prior versions. that won't last long.

pbrumm commented 1 year ago

those 4 libs changed today and must have pushed it past the limit.

robdimsdale commented 1 year ago

Yeah, it sounds like you're hitting the layer limit. This is a limitation of the docker layer limit combined with the fact that the full builder (with buildpacks) contains a lot of different buildpacks. Once you start adding your own you can easily go over the limit.

Given that you know your list of buildpacks, I'd suggest switching to the buildpackless builder I linked above.

Also, as an aside, I'd suggest you switch to the jammy builder - the bionic builder (which is what you're using above) is deprecated and not updated. It likely has unaddressed CVEs.