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

[WIP] Add compatibility for both flyway 9 and 10 for 38923 #40698

Conversation

MazizEsa
Copy link

In summary added compatibility with flyway 10 and 9 by using reflection when initializing flyway scanner.
Add mechanism to check the dependency based on the mentioned flyway versions.

…lyway 10 and flyway 9

2. Added test for flyway scanner 9.
@MazizEsa
Copy link
Author

MazizEsa commented May 12, 2024

Hi @wilkinsona
Can you have a look. This is a draft (for #38923), WIP.
Im wanna check first whether it's in the right direction.
Still need to add checks / conditions on dependency part to cater the different dependencies and package structure when importing (postgres and hsql) and some cleanup.

Thanks in advance.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 12, 2024
@MazizEsa MazizEsa changed the title [WIP] Add compatibility for both flyway 10 and 9 [WIP] Add compatibility for both flyway 10 and 9 for 38923 May 12, 2024
@wilkinsona
Copy link
Member

Thanks, @MazizEsa. For the default case (Flyway 9), please don't use reflection. Instead, just directly call the Flyway API that we compile against. Only when Flyway 10's detected should reflection be used.

Also, if you can, please build your changes (./gradlew build or ./gradlew spring-boot-project:spring-boot-autoconfigure:build) and fix any problems before pushing.

@MazizEsa
Copy link
Author

MazizEsa commented May 13, 2024 via email

@wilkinsona
Copy link
Member

As I said a couple of weeks ago, the change is only needed in the 3.2.x branch. As you've noticed, we've already upgraded to Flyway 10 in the main branch so nothing's needed there. Please use 3.2.x as the base branch for your changes.

@MazizEsa
Copy link
Author

MazizEsa commented May 13, 2024

Thanks @wilkinsona . My bad. I was told either branch was fine before. Will make the changes soon.

@MazizEsa MazizEsa changed the title [WIP] Add compatibility for both flyway 10 and 9 for 38923 [WIP] Add compatibility for both flyway 9 and 10 for 38923 May 19, 2024
@MazizEsa MazizEsa closed this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants