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

Removed functions in 9.20.0 release break Spring Boot's use of flyway. #3694

Closed
bseeger opened this issue Jun 21, 2023 · 14 comments
Closed

Removed functions in 9.20.0 release break Spring Boot's use of flyway. #3694

bseeger opened this issue Jun 21, 2023 · 14 comments

Comments

@bseeger
Copy link

bseeger commented Jun 21, 2023

Which version and edition of Flyway are you using?

Attempting to upgrade to 9.20.0, am using 9.19.4 successfully.
Spring Boot 3.0.5 (also tried 3.1.0)

If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Yes, it's in the latest release.

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Gradle

Which database are you using? (Type & version)

Postgres 14.7

Which operating system are you using?

Mac OSX

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

Our project is based on Spring Boot 3.0.5

I tried to upgrade flyway library to latest minor release: 9.20.0. I am seeing this failure:

Caused by: java.lang.NoSuchMethodError: 'org.flywaydb.core.api.configuration.FluentConfiguration org.flywaydb.core.api.configuration.FluentConfiguration.oracleSqlplus(boolean)'

I understand that it's because that method along with many others were removed.

I want to note, too, that this issue I'm seeing is because Spring Boot hasn't adapted yet to this brand new change - they, of course, haven't had time.

What I'm surprised about though is a breaking change in flyway in a minor release. There are several functions not marked as deprecated that have been removed. At least they weren't marked deprecated in the code that was removed. (were they marked as deprecated somewhere and maybe I missed it??)

Mostly I wanted to let you know that this minor release has a large negative effect because it's a breaking change.

What did you expect to see?

Didn't expect for a function to be removed from a minor release. I cannot upgrade to this change, because Spring Boot needs to update first.

What did you see instead?
@bseeger bseeger changed the title Removed functions in 19.20.0 release break Spring Boot's use of flyway. Removed functions in 9.20.0 release break Spring Boot's use of flyway. Jun 21, 2023
@Idane
Copy link

Idane commented Jun 22, 2023

This is also breaking on our project, if anyone needs to reproduce krud-dev/ostara#584

@hjortling
Copy link

hjortling commented Jun 22, 2023

Same for us when upgrading org.flywaydb:flyway-core and org.flywaydb:flyway-database-oracle from 9.19.4 to 9.20.0
Running on:
Spring boot 3.1.0 ,
Oracle Database 19c

@Barry-RG
Copy link
Contributor

Thank you for your update. Unfortunately since we do not directly develop the Spring Boot integration there may be a delay in fixing this issue. However, the oracleSqlplus is a Teams paid for feature not a free community feature which is what are supported by Spring Boot. As a result this is a surprise as to why they are including it.

@wilkinsona
Copy link
Contributor

Spring Boot supports several Teams features. My memory's a little hazy but I believe we added support back in the Boxfuse days when @axelfontaine was leading the project.

We should only try to set a Teams feature if it has been configured by the user. For example, the oracleSqlplus plus method should only be called if the spring.flyway.oracle-sqlplus configuration property has been set. This is how we were able to support both the Teams and Community editions. Unfortunately, now that the method has been removed entirely, the method reference that we use (map.from(properties.getOracleSqlplus()).to(configuration::oracleSqlplus);) results in an exception even when the method won't actually be called. We should be able to avoid the problem by using a lambda expression instead as we do in several places already.

@g-stone7
Copy link

This bug is blocking me from upgrading to Spring Boot 3.1.1 too

@roded
Copy link

roded commented Jul 1, 2023

Does flyway not follow semver?
Should we expect 'minor' (y in x.y.z) versions to include breaking changes?
Thanks

@chrootlogin
Copy link

Bug verfied! Downgrading to 9.19.4 helps. You should follow semver and don't put breaking changes in a minor version.

@joschi
Copy link

joschi commented Jul 20, 2023

@asgarddesigns
Copy link

Should be fixed in https://github.com/spring-projects/spring-boot/releases/tag/v2.7.14 via spring-projects/spring-boot#36029.

There's also a 3.1.x release for those using it:

https://github.com/spring-projects/spring-boot/releases/tag/v3.1.2

@bratkartoffel
Copy link

I can confirm that this is fixed with spring boot 3.1.2, Thanks!

@bseeger
Copy link
Author

bseeger commented Jul 21, 2023

I can confirm that the fix in Spring Boot 3.1.2 works for my setup as well. Thanks!

@botPotyo
Copy link

It is "fixed" as long as you don't want to use the oracleSqlPlus property. If you have the Teams version (we do) and want to make use of this property then the Spring code is still broken. The way to set this property when using flyway >9.20 is documented on this page under the API heading: https://documentation.red-gate.com/fd/oracle-sqlplus-184127520.html

I checked and the OracleConfigurationExtension class is available in the free version of the flyway-database-oracle library. So, Spring can make this update in their code without having to depend on the Teams version.

@wilkinsona
Copy link
Contributor

So, Spring can make this update in their code without having to depend on the Teams version.

We've already done that for Spring Boot 3.2 (GA in November). Unfortunately, the breaking API changes make it prohibitively difficult for us to support Flyway 9.19 and earlier at the same time as 9.20 and we can't force an upgrade to Flyway 9.20 in a maintenance release of Spring Boot. The net of this is that property-based support for the relocated Oracle settings has to wait till a new Spring Boot minor. In the meantime, programmatic configuration through a FlywayConfigurationCustomizer is an option for those who wish to use Flyway 9.20 with Spring Boot 3.1 and earlier.

@botPotyo
Copy link

Thanks for the response @wilkinsona!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests