add support for spring boot 4, with a fallback to 3#1226
add support for spring boot 4, with a fallback to 3#1226zakerf wants to merge 1 commit intocloudfoundry:mainfrom
Conversation
|
|
32072db to
ad838f3
Compare
| source_sha256: 9cc8d4c368bc90eafb7b6b14bc34c57ef5523f3ec8546e3fbd91326cdfc13500 | ||
| - name: java-cfenv | ||
| version: 4.0.0 | ||
| uri: https://java-buildpack.cloudfoundry.org/java-cfenv/java-cfenv-4.0.0.jar |
There was a problem hiding this comment.
This file is not available at this url but I couldn't find what the process was to get it available there
There was a problem hiding this comment.
we need to add this to our dependecy-builds pipeline
https://github.com/cloudfoundry/buildpacks-ci/tree/master/pipelines/dependency-builds
There was a problem hiding this comment.
Should I prep a PR for that or do you have something in the works for it?
There was a problem hiding this comment.
The manifest will be populated once we add it to the buildpack dependency config in our overall dependency pipeline
|
why is a fallback necessary? |
|
@ramonskie I think calls to SpringBoot deps change when going from SpringBoot 3 -> 4, so you I guess you run into runtime "class not found" exceptions: e.g. pivotal-cf/java-cfenv@1dd9ccb |
| - name: java-cfenv | ||
| - name: java-cfenv-sb3 | ||
| version: 3.5.0 | ||
| uri: https://java-buildpack.cloudfoundry.org/java-cfenv/java-cfenv-3.5.0.jar |
There was a problem hiding this comment.
can we also up this to 3.5.1?
There was a problem hiding this comment.
yes that is possible
we could keep 2 lines
i already was worrking on a document for migrate/add to automation
see https://github.com/cloudfoundry/buildpacks-ci/blob/bfed40a5c25b065973b851dd5269a734fc380d1c/docs/java-dependency-migration-plan.md#java-cfenv---active-v400-released-feb-2026-breaking-change-from-3x
There was a problem hiding this comment.
there is also a bigger problem. and that is that the buildpack is now exceeding the 1gb range. and is now even 1.2gb
so adding more dependencies/version is something we need to be aware off
There was a problem hiding this comment.
Yep, I saw the size was also an issue in the past when Java 21 was added. There is a lot in the "--cached" buildpack.zip indeed. Did a local check and biggest dependencies are your-kit-profiler (137MB) and jprofiler (119MB). Then we have 5 java versions (8,11,17,21,25) in 3 distributions (OpenJDK, Zulu, SAPMachine) for a total of ~596MB. In comparison: the java-cfenv jar is about 872kb. ;-)
Seems off topic here: maybe for another issue/PR: is it possible to create slimmed down versions? E.g. with only one JDK distribution and with/without profilers?
We create a stripped down offline buildpack ourselves with only what we need by removing entries from the manifest.yml file. (One downside: if you then request something not present, e.g. a profiler that is not included, the cf push fails with an unclear error message).
|
@ramonskie the compatibility matrix also mentions that java-cfenv 4.x is for Spring Boot 4 and java-cfenv 3.x is for Spring Boot 3 |
|
|
||
| // Don't enable if java-cfenv is already in the application | ||
| if j.hasJavaCfEnv() { | ||
| j.context.Log.Debug("java-cfenv already present in application") |
There was a problem hiding this comment.
Might be good to log this at info level to avoid confusion wether cf env is available. Nice to have is to also parse the version in hasJavaCfEnv and report the found version.
related to #1222