-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(): Added JDBC heartbeat #2081
Conversation
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.
There is a log of business rules inside the repository, I wonder if it should not be moved to the caller as a repository should only take care of accessing the data.
jdbc-postgres/src/main/resources/migrations/postgres/V2_1__initial.sql
Outdated
Show resolved
Hide resolved
jdbc-postgres/src/main/resources/migrations/postgres/V2_1__initial.sql
Outdated
Show resolved
Hide resolved
jdbc-postgres/src/main/resources/migrations/postgres/V2_1__initial.sql
Outdated
Show resolved
Hide resolved
jdbc/src/main/java/io/kestra/jdbc/repository/AbstractJdbcWorkerHeartbeatRepository.java
Outdated
Show resolved
Hide resolved
jdbc/src/main/java/io/kestra/jdbc/repository/AbstractJdbcWorkerHeartbeatRepository.java
Outdated
Show resolved
Hide resolved
webserver/src/main/java/io/kestra/webserver/controllers/WorkerInstanceController.java
Show resolved
Hide resolved
748de53
to
8e9caeb
Compare
Still need to write tests, but will do it after the logic is validated. |
8e9caeb
to
848d933
Compare
848d933
to
9919d9e
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 didn't add time to review everything but here are a first batch of feedbacks.
As a side note, I would have prefer to have the PR split in two heartbeat and resubmit it would have been easier to reason about.
webserver/src/main/java/io/kestra/webserver/controllers/MiscController.java
Outdated
Show resolved
Hide resolved
webserver/src/main/java/io/kestra/webserver/controllers/WorkerInstanceController.java
Show resolved
Hide resolved
core/src/main/java/io/kestra/core/repositories/WorkerInstanceRepositoryInterface.java
Outdated
Show resolved
Hide resolved
jdbc/src/main/java/io/kestra/jdbc/repository/AbstractJdbcWorkerJobRunningRepository.java
Outdated
Show resolved
Hide resolved
jdbc/src/main/java/io/kestra/jdbc/repository/AbstractJdbcWorkerJobRunningRepository.java
Outdated
Show resolved
Hide resolved
jdbc-h2/src/main/java/io/kestra/runner/h2/H2WorkerJobQueue.java
Outdated
Show resolved
Hide resolved
2a3d294
to
a1f8ec5
Compare
9d7b607
to
251187a
Compare
c423c91
to
e0af053
Compare
core/src/main/java/io/kestra/core/repositories/WorkerJobRunningInterface.java
Outdated
Show resolved
Hide resolved
core/src/test/java/io/kestra/core/repositories/AbstractWorkerInstanceRepositoryTest.java
Outdated
Show resolved
Hide resolved
jdbc-h2/src/main/java/io/kestra/runner/h2/H2WorkerJobQueue.java
Outdated
Show resolved
Hide resolved
jdbc/src/main/java/io/kestra/jdbc/repository/AbstractJdbcWorkerJobRunningRepository.java
Outdated
Show resolved
Hide resolved
jdbc-h2/src/main/resources/migrations/h2/V1_2__worker_heartbeat.sql
Outdated
Show resolved
Hide resolved
e0af053
to
007b4a7
Compare
eaceb06
to
5f8c24a
Compare
5f8c24a
to
d475142
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.
LGTM
See #2201 for some followup on the implementation |
d475142
to
d169037
Compare
d169037
to
a70f840
Compare
jdbc/src/main/java/io/kestra/jdbc/JdbcPostgresWorkerJobQueueService.java
Outdated
Show resolved
Hide resolved
64ee18a
to
f3e8f61
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.
Some minor feedback but overall LGTM
jdbc/src/main/java/io/kestra/jdbc/JdbcWorkerJobQueueService.java
Outdated
Show resolved
Hide resolved
jdbc/src/main/java/io/kestra/jdbc/JdbcWorkerJobQueueService.java
Outdated
Show resolved
Hide resolved
…erJobQueueService
SonarCloud Quality Gate failed. 1 Bug 72.2% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
close #2055