Copilot commented on code in PR #15648:
URL: https://github.com/apache/grails-core/pull/15648#discussion_r3211400064
##########
grails-forge/grails-forge-analytics-postgres/build.gradle:
##########
@@ -36,9 +36,16 @@ dependencies {
implementation 'io.micronaut.data:micronaut-data-jdbc'
implementation 'io.micronaut.flyway:micronaut-flyway'
implementation 'io.micronaut.sql:micronaut-jdbc-hikari'
- implementation "org.postgresql:postgresql:$postgresqlVersion"
+ implementation "org.postgresql:postgresql"
Review Comment:
The PostgreSQL JDBC driver is only needed on the runtime classpath (it is
referenced via JDBC URL/driver class name in config, not from compiled
sources). Using `implementation` here needlessly adds it to the compile
classpath; consider switching this dependency to `runtimeOnly` (and now that
there’s no interpolation, use single quotes for consistency with the rest of
the file).
##########
grails-forge/grails-forge-analytics-postgres/build.gradle:
##########
@@ -36,9 +36,16 @@ dependencies {
implementation 'io.micronaut.data:micronaut-data-jdbc'
implementation 'io.micronaut.flyway:micronaut-flyway'
implementation 'io.micronaut.sql:micronaut-jdbc-hikari'
- implementation "org.postgresql:postgresql:$postgresqlVersion"
+ implementation "org.postgresql:postgresql"
- runtimeOnly "ch.qos.logback:logback-classic:$logbackClassicVersion"
+ // Flyway 10.x split the PostgreSQL DatabaseType implementation out of
+ // flyway-core into a dedicated module. Without it, Flyway's
+ // ServiceLoader<DatabaseType> lookup fails at runtime with
+ // "FlywayException: Unsupported Database: PostgreSQL <ver>" and the
+ // analytics service crashes during datasource initialization on
+ // Cloud Run, causing the deploy revision to fail its startup probe.
+ runtimeOnly 'org.flywaydb:flyway-database-postgresql'
+ runtimeOnly "ch.qos.logback:logback-classic"
runtimeOnly 'io.micronaut:micronaut-jackson-databind'
Review Comment:
Use single quotes for non-interpolated dependency notation to match the
style used elsewhere in this build file (e.g. other `runtimeOnly` entries).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]