-
Notifications
You must be signed in to change notification settings - Fork 21
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
Failed migrations via micronaut-jpa cause beanCreation error with no failed migration logs #77
Comments
@nhoughto You didn't mention Micronaut and Micronaut-Flyway version. With Micronaut 2.0.1 I'm not able to reproduce the issue. Please take a look at this test application https://github.com/micronaut-core-issues-test-app/issue-flyway-77 I've added a migration with an SQL error and this is the log when starting the application. As you can see there is plenty of information regarding the migration that failed:
|
Hmm nope can repro on 2.0.1 / latest versions Yours seems to fail on DataSource, my run fails on |
I guess ill see if I can make your repro repo match my experience and then get back to you 👍 |
Closing due to lack of feedback. If the problem persist please try with the latest version and open a new issue. Thanks. |
Looks like I have something similar? https://stackoverflow.com/q/70413053/7776688 |
@sambalmueslie please include a project that reproduces the problem and I'll take a look at it. |
and here are some more infos Good Case (after upgrading to micronaut 3.1.0 gradle plugin)
Bad case, after changing @KafkaClient (removing value for id, so nothing which causes the problem)
There is definitively a difference between the loaded References. |
I found a workaround, if he did not find all classes, running gradle clean build manually solves the issue. |
If a migration fails (invalid SQL etc, whatever) whilst being applied by micronaut-flyway in the context of a micronaut-jpa project a bean creation error is thrown but no migration failure logging from flyway is shown, making it very hard to diagnose what the actual problem is.
Looking at the BeanCreatedEventListener, DataSourceMigrationRunner it doesn't do any logging of the exception?
micronaut-flyway/flyway/src/main/java/io/micronaut/flyway/DataSourceMigrationRunner.java
Line 64 in 9863860
Logs:
The text was updated successfully, but these errors were encountered: