-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Flyway and Liquibase are now run as init containers in manifests. #29026
Flyway and Liquibase are now run as init containers in manifests. #29026
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
12ba35e
to
cfe5c17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a suggestion for properly stopping the application
extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayRecorder.java
Outdated
Show resolved
Hide resolved
extensions/liquibase/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseRecorder.java
Outdated
Show resolved
Hide resolved
cfe5c17
to
a8f2aa1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, thanks!
We should also include documentation in the liquibase and flyway extensions about this |
a8f2aa1
to
c3f7d7a
Compare
extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java
Outdated
Show resolved
Hide resolved
Liquibase MongoDB is missing, if you didn't have time to include it in this PR can you open an issue to not forget it ? |
c3f7d7a
to
3f8b51d
Compare
extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayRuntimeConfig.java
Outdated
Show resolved
Hide resolved
7eb7ab0
to
347a01e
Compare
Added some new changes:
|
Forgot to mention:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing!
I have a few questions and suggestions
core/deployment/src/main/java/io/quarkus/deployment/builditem/InitTaskBuildItem.java
Outdated
Show resolved
Hide resolved
core/deployment/src/main/java/io/quarkus/deployment/builditem/InitTaskBuildItem.java
Outdated
Show resolved
Hide resolved
core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java
Show resolved
Hide resolved
extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayRuntimeConfig.java
Show resolved
Hide resolved
...illa/deployment/src/main/java/io/quarkus/kubernetes/deployment/AddJobResourceDecorator2.java
Show resolved
Hide resolved
...ngodb/runtime/src/main/java/io/quarkus/liquibase/mongodb/runtime/LiquibaseMongodbConfig.java
Show resolved
Hide resolved
...ngodb/runtime/src/main/java/io/quarkus/liquibase/mongodb/runtime/LiquibaseMongodbConfig.java
Outdated
Show resolved
Hide resolved
...ase/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseDataSourceRuntimeConfig.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked something that I would like to be clarified.
Also probably a good idea to at least squash this commit given it's a fixup (and maybe others, I have no idea if they are semantically separate).
extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayRecorder.java
Show resolved
Hide resolved
🎉 I'll have another look tomorrow |
core/runtime/src/main/java/io/quarkus/runtime/init/InitializationTaskRecorder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only added a couple tiny comments, I think this is almost good to go!
db7cf54
to
4e72544
Compare
4e72544
to
4e93bb4
Compare
@geoand: feedback applied, can you please have another look? |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
The pull request introduces an initialization phase where init tasks like Flyway & Liquibase migration take place. It allows users to run those tasks in isolation (without running the whole application).
For Kubernetes environments where it only makes sense for such tasks to run once, the Kubernetes manifest generator exposes them as
Jobs
and tunesDeployment
so that they only run once initialization is complete.In other words, it enables the scaling of Quarkus applications that use init tasks in Kubernetes.