Closed S78901 closed 1 month ago
This PR is ready for review, but when I run the server tests I get the failures below. Can a server-side person look into these? @mjperry91 @ZacharyKlein @mkimberlin
Task :server:test
MailJetSenderTest > initializationError FAILED io.micronaut.context.exceptions.BeanInstantiationException at DefaultBeanContext.java:1982 Caused by: org.flywaydb.core.api.FlywayException at CompositeMigrationResolver.java:92
CheckinsOpenIdAuthenticationMapperTest > initializationError FAILED io.micronaut.context.exceptions.BeanInstantiationException at DefaultBeanContext.java:1982 Caused by: org.flywaydb.core.api.FlywayException at CompositeMigrationResolver.java:92
GoogleServiceConfigurationTest > initializationError FAILED io.micronaut.context.exceptions.BeanInstantiationException at DefaultBeanContext.java:1982 Caused by: org.flywaydb.core.api.FlywayException at CompositeMigrationResolver.java:92
LocalLoginControllerTest > initializationError FAILED io.micronaut.context.exceptions.BeanInstantiationException at DefaultBeanContext.java:1982 Caused by: org.flywaydb.core.api.FlywayException at CompositeMigrationResolver.java:92
@mvolkmann I believe the issue is that you just need to rename the migration file to v105. I merged a v104 recently that you probably pulled in and its clashing
@mvolkmann I believe the issue is that you just need to rename the migration file to v105. I merged a v104 recently that you probably pulled in and its clashing
Good catch Matt! I made that change and now I get this when starting the server:
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [javax.sql.DataSource] could not be loaded: Validate failed: Migrations have failed validation Migration checksum mismatch for migration version 104 -> Applied to database : 1693780324 -> Resolved locally : -1007549982 Either revert the changes to the migration, or run repair to update the schema history.
Can you tell me how do to what it suggests on the last line?
@mvolkmann I believe the issue is that you just need to rename the migration file to v105. I merged a v104 recently that you probably pulled in and its clashing
Good catch Matt! I made that change and now I get this when starting the server:
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [javax.sql.DataSource] could not be loaded: Validate failed: Migrations have failed validation Migration checksum mismatch for migration version 104 -> Applied to database : 1693780324 -> Resolved locally : -1007549982 Either revert the changes to the migration, or run repair to update the schema history.
Can you tell me how do to what it suggests on the last line?
Its likely because the v104 from this pr was applied to your database, and now that you switched the names around, the v104 from develop is being applied instead, but they don't match so flyway doesn't know what to do.
Simplest thing to do would be delete your db container, and redo podman compose up -d. I think that would fix this. Otherwise you can try messing around with flyway repair that it mentioned in the error, but I'm not 100% how to do that.
The database migration issue is fixed and this PR is ready for review.
In relation to: https://github.com/objectcomputing/check-ins/issues/2422