Skip to content

Conversation

@S78901
Copy link
Contributor

@S78901 S78901 commented May 21, 2024

In relation to:
#2422

@S78901 S78901 linked an issue May 21, 2024 that may be closed by this pull request
7 tasks
@mvolkmann mvolkmann changed the title Issue 2422 feature 2422 - last seen date May 24, 2024
@mvolkmann mvolkmann marked this pull request as ready for review May 24, 2024 14:59
@mvolkmann
Copy link
Collaborator

mvolkmann commented May 24, 2024

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

@mjperry91
Copy link
Collaborator

@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
Copy link
Collaborator

@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?

@mjperry91
Copy link
Collaborator

@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.

@mvolkmann
Copy link
Collaborator

The database migration issue is fixed and this PR is ready for review.

Copy link
Collaborator

@mjperry91 mjperry91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@mvolkmann mvolkmann merged commit 146d471 into develop May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track last seen date for users

5 participants