Task 7: Upgrade Flyway 9.22.3 and MySQL Connector/J 8.4.0#196
Task 7: Upgrade Flyway 9.22.3 and MySQL Connector/J 8.4.0#196devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Flyway: 6.0.0 -> 9.22.3 (latest 9.x, Java 8+ compatible) - MySQL Connector: mysql:mysql-connector-java:8.0.33 -> com.mysql:mysql-connector-j:8.4.0 (artifact renamed) Co-Authored-By: Wes Convery <2wconvery@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion" | ||
|
|
||
| runtime 'mysql:mysql-connector-java:8.0.33' | ||
| runtime 'com.mysql:mysql-connector-j:8.4.0' |
There was a problem hiding this comment.
🔴 mysql-connector-j 8.4.0 (Innovation release) is incompatible with the project's Java 8 runtime
The PR upgrades from mysql:mysql-connector-java:8.0.33 (LTS) to com.mysql:mysql-connector-j:8.4.0 (Innovation release). MySQL Connector/J Innovation releases (8.1.0+) require Java 11+. However, the project runs on Java 8: the application Dockerfile at ftgo-application/Dockerfile:1 uses openjdk:8u171-jre-alpine, and build.gradle:21-22 sets sourceCompatibility = '1.8' / targetCompatibility = '1.8'. At runtime, the application will fail with UnsupportedClassVersionError when attempting to load any class from the connector. The last compatible LTS version would be com.mysql:mysql-connector-j:8.0.33 (or the latest 8.0.x patch).
Prompt for agents
The mysql-connector-j 8.4.0 is a MySQL Innovation release that requires Java 11+, but the project targets Java 8 (see ftgo-application/Dockerfile using openjdk:8u171-jre-alpine, and build.gradle setting sourceCompatibility/targetCompatibility to 1.8). This incompatibility affects all three files where the connector is declared: ftgo-application/build.gradle, ftgo-common/build.gradle, and buildSrc/build.gradle. Either downgrade to the latest 8.0.x LTS release (e.g. com.mysql:mysql-connector-j:8.0.33) which supports Java 8, or upgrade the entire project to Java 11+ (Dockerfile, build.gradle sourceCompatibility/targetCompatibility, and Gradle wrapper).
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Confirmed — the project uses Java 8 (openjdk:8u171-jre-alpine in Dockerfile, sourceCompatibility = '1.8' in build.gradle). MySQL Connector/J 8.4.0 is an Innovation release requiring Java 11+, so this would cause UnsupportedClassVersionError at runtime.
The safe option for the artifact rename while staying Java 8 compatible would be com.mysql:mysql-connector-j:8.0.33. Flagging to the PR author for guidance on how to proceed.
| @@ -1,5 +1,5 @@ | |||
| plugins { | |||
| id "org.flywaydb.flyway" version "6.0.0" | |||
| id "org.flywaydb.flyway" version "9.22.3" | |||
There was a problem hiding this comment.
🔴 Flyway 9.22.3 Gradle plugin is incompatible with Gradle 4.10.2
The Flyway Gradle plugin is upgraded from 6.0.0 to 9.22.3 — a 3-major-version jump. The project uses Gradle 4.10.2 (from 2018, per gradle/wrapper/gradle-wrapper.properties). Flyway 9.x's Gradle plugin (released 2023) uses modern Gradle APIs (lazy Property configuration, @Input annotations, etc.) that are not available in Gradle 4.x. The ./gradlew :ftgo-flyway:flywayMigrate task (invoked in build-and-test-all.sh:42) will fail during Gradle configuration or plugin application.
Prompt for agents
The Flyway Gradle plugin was upgraded from 6.0.0 to 9.22.3, but the project still uses Gradle 4.10.2 (see gradle/wrapper/gradle-wrapper.properties). Flyway 9.x requires a much newer Gradle version (at minimum Gradle 7.x). Either downgrade Flyway to a version compatible with Gradle 4.10.2 (e.g. Flyway 6.x), or upgrade the Gradle wrapper to a version compatible with Flyway 9.x (Gradle 7.x or newer). Note that upgrading Gradle would also require updating deprecated APIs used throughout the build scripts (e.g. the 'compile' configuration was replaced by 'implementation' in newer Gradle versions).
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Confirmed — the project uses Gradle 4.10.2 (per gradle/wrapper/gradle-wrapper.properties). Flyway 9.x's Gradle plugin requires modern Gradle APIs not available in Gradle 4.x. The flywayMigrate task would fail during configuration.
A compatible upgrade path would either be staying on Flyway 6.x or upgrading Gradle first. Flagging to the PR author for guidance.
Summary
Upgrades two key dependencies across the monolith:
6.0.0→9.22.3inftgo-flyway/build.gradlemysql:mysql-connector-java:8.0.33→com.mysql:mysql-connector-j:8.4.0in three locations:ftgo-application/build.gradleftgo-common/build.gradlebuildSrc/build.gradlemysql:mysql-connector-javatocom.mysql:mysql-connector-j.Review & Testing Checklist for Human
./gradlew buildto confirm dependency resolution and compilation succeedNotes
Link to Devin session: https://app.devin.ai/sessions/7f868be918bf4636817611705d3c74d4
Requested by: @WesternConcrete
Devin Review