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

Upgrade to Spring Boot 2.7.x #1185

Merged
merged 14 commits into from
Oct 13, 2022
Merged

Upgrade to Spring Boot 2.7.x #1185

merged 14 commits into from
Oct 13, 2022

Conversation

elefeint
Copy link
Contributor

@elefeint elefeint commented Jul 12, 2022

With Spring Boot 2.7, the old R2DBC drivers for MySQL and Postgres were removed from the BOM (Spring Boot 2.7 release notes).

Spring Cloud GCP typically follows Spring Cloud, which supports both Spring Boot 2.6 and 2.7 in the same major version of their release trains. Additionally, we are not planning on releasing a major version, so the main goal is to not break existing users. This means keeping the old versions of drivers in Spring Cloud GCP R2DBC starters and managing the two drivers' version in Spring Cloud GCP BOM (spring-cloud-gcp-dependencies).

Postgres:

  • Changed Maven coordinates from io.r2dbc to org.postgres. Package named stayed the same, so the drivers are technically mutually compatible. However, the new driver uses a constant introduced in R2DBC SPI 0.9 (LOCK_WAIT_TIMEOUT), and so is not compatible with applications still on Spring Boot 2.6.x.
  • Using the old driver (0.8.12.RELEASE) is safe for both Spring Boot 2.6 and 2.7.
  • Spring Boot 2.7 users who want the new functionality will need to exclude the old driver dependency and include the new one. Documentation included in PR.

MySQL

  • old driver is safe for both Spring Boot 2.6 and 2.7.
  • MariaDB driver is recommended, however there is work to be done in both the socket factory and MariaDB driver to allow its use.

I've tested 5 combinations:

  • MySQL with Spring Boot 2.6
  • Postgres with Spring Boot 2.6
  • MySQL with Spring Boot 2.7
  • Postgres with Spring Boot 2.7 -- as is, using old 0.8.12.RELEASE driver that's included in the starter.
  • Postgres with Spring Boot 2.7 -- with customer app excluding the old driver and including `r2dbc-postgresql-0.9.1.RELEASE instead.

Addresses a part of #1200.

@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@elefeint elefeint marked this pull request as ready for review October 7, 2022 19:45
Copy link
Contributor

@mpeddada1 mpeddada1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sonarcloud
Copy link

sonarcloud bot commented Oct 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@breun
Copy link
Contributor

breun commented Oct 17, 2022

I see Spring Cloud GCP 3.4.0 has been released with support for Spring Boot 2.7, which is great news! I guess https://github.com/GoogleCloudPlatform/spring-cloud-gcp#compatibility-with-spring-project-versions should be updated to indicate support for Spring Boot 2.7 is now available in version 3.4.0?

@elefeint
Copy link
Contributor Author

I'll send a pull request; waiting on the last prerequisite.

kateryna216 added a commit to kateryna216/spring-cloud-gcp that referenced this pull request Oct 20, 2022
Add valid driver versions for old R2DBC drivers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants