Skip to content
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

Spring Boot and Spring Cloud compatibility check on startup #3513

Open
StefanHufschmidt opened this issue Jan 30, 2025 · 1 comment
Open
Labels
priority: p2 type: enhancement New feature or request

Comments

@StefanHufschmidt
Copy link

Problem:
I recently ran into a problem with Jackson while using spring-cloud-gcp within a Spring-Boot project together with Spring Cloud. This was related to a bad versioning on my side. With automated dependency updates I got to a state where I used Spring Boot 3.4.2 together with Spring Cloud 2024.0.0 and spring-cloud-gcp 5.10.0.
After having a look at the spring-cloud-gcp compatibility matrix I noticed that it is not compatible.

Previous updates like Spring Boot from 3.3.x to 3.4.x or the major Spring Cloud update to 2024.0.0 seemed to work fine together with spring-cloud-gcp 5.9.0. The compatibility matrix on the other hand show that it should be incompatible and not be used together with Spring Cloud 5.x. This will be left unrecognized unless you double check every Spring Boot or Spring Cloud update with the compatibility matrix.

Suggestion:
From Spring Cloud I'm used to get an exception on startup which tells me that the Spring Boot release is incompatible with the selected Spring Cloud release if my dependency update system is too fast with its updates.
It uses a SpringBootVersionVerifier to check if the current used Spring Cloud is compatible with the related Spring Boot version and prints something like this:

***************************
APPLICATION FAILED TO START
***************************
Description:
Your project setup is incompatible with our requirements due to following reasons:
- Spring Boot [3.3.0] is not compatible with this Spring Cloud release train
Action:
Consider applying the following actions:
- Change Spring Boot version to one of the following versions [3.2.x] .
You can find the latest Spring Boot versions here [https://spring.io/projects/spring-boot#learn]. 
If you want to learn more about the Spring Cloud Release train compatibility, you can visit this page [https://spring.io/projects/spring-cloud#overview] and check the [Release Trains] section.
If you want to disable this check, just set the property [spring.cloud.compatibility-verifier.enabled=false]

I'd suggest implementing a similar approach within spring-cloud-gcp as well, so that it will not accidentally happen that you're using an unsupported Spring Boot or Spring Cloud version and that simple integration tests will already fail on startup. This way I'd notice on early updates of Spring Boot or Spring Cloud that my versioning became incompatible.

@lqiu96 lqiu96 added type: enhancement New feature or request priority: p2 labels Jan 30, 2025
@lqiu96
Copy link
Contributor

lqiu96 commented Jan 30, 2025

Thanks for the suggestion! It seems like a reasonable enhancement to me and I'll CC a few folks who are more familiar with this. We do welcome contributions as well!

CC: @jinseopkim0 @mpeddada1 @zhumin8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants