Closed
Description
Hi there,
I am currently seeing a strange behavior when using offline buildpacks, where the version used is not included in the offline package and therefore fails to stage the app.
Steps to reproduce the issue:
git clone https://github.com/cloudfoundry/java-buildpack.git
cd java-buildpack
git checkout v4.37
bundle exec rake clean package OFFLINE=true PINNED=true STACK=cflinuxfs3 VERSION="v4.37"
mv build/java-buildpack-offline-v4.37.zip ./java-buildpack-offline-v4.37.zip
git checkout v4.39
bundle exec rake clean package OFFLINE=true PINNED=true STACK=cflinuxfs3 VERSION="v4.39"
cf login
cf create-buildpack java-offline-buildpack-v4-39 ./build/java-buildpack-offline-v4.39.zip 1
cf create-buildpack java-offline-buildpack-v4-37 ./build/java-buildpack-offline-v4.37.zip 1
cf push spring-music -f manifest.yml -b java-offline-buildpack-v4-37
Manifest looks like this:
---
applications:
- name: spring-music
instances: 1
memory: 1G
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 1.8.+}}'
We are using spring-music to test the behavior.
In our env we can see that the staging fails due to this error:
2021-07-14T08:27:00.95+0000 [STG/0] ERR [Buildpack] ERROR Finalize failed with exception #<RuntimeError: Unable to find cached file for https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/bellsoft-jre8u292%2B10-linux-amd64.tar.gz>
2021-07-14T08:27:00.95+0000 [STG/0] ERR Unable to find cached file for https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/bellsoft-jre8u292%2B10-linux-amd64.tar.gz
2021-07-14T08:27:00.96+0000 [STG/0] ERR Failed to compile droplet: Failed to run finalize script: exit status 1
We would expect the buildpack to choose the included version 1.8.0_282
.
Beside that, for me v4.37
pins version to 11.0.11_9
but according to the release notes it should be 11.0.10_9
.