-
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
fix(jdbc): handle trigger in jdbc heartbeat/resubmit #2240
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Skraye
force-pushed
the
fix/heartbeat-trigger-issue
branch
4 times, most recently
from
October 9, 2023 14:13
7c8dbf4
to
e9c5d4e
Compare
Skraye
force-pushed
the
fix/heartbeat-trigger-issue
branch
3 times, most recently
from
October 9, 2023 15:40
ad6fd5c
to
2b52d4a
Compare
tchiotludo
requested changes
Oct 10, 2023
jdbc-postgres/src/main/resources/migrations/postgres/V1_2__worker_heartbeat.sql
Outdated
Show resolved
Hide resolved
loicmathieu
requested changes
Oct 10, 2023
core/src/main/java/io/kestra/core/repositories/WorkerJobRunningRepositoryInterface.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/kestra/core/queues/WorkerTriggerResultQueueInterface.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/kestra/core/runners/WorkerTaskRunning.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/kestra/core/runners/WorkerTriggerRunning.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/kestra/core/runners/WorkerTriggerRunning.java
Outdated
Show resolved
Hide resolved
jdbc/src/main/java/io/kestra/jdbc/JdbcWorkerTriggerResultQueueService.java
Outdated
Show resolved
Hide resolved
jdbc/src/test/java/io/kestra/jdbc/runner/JdbcHeartbeatTest.java
Outdated
Show resolved
Hide resolved
jdbc/src/test/java/io/kestra/jdbc/runner/JdbcHeartbeatTest.java
Outdated
Show resolved
Hide resolved
Skraye
force-pushed
the
fix/heartbeat-trigger-issue
branch
from
October 10, 2023 13:14
c7136b2
to
88d66d2
Compare
SonarCloud Quality Gate failed. 0 Bugs 43.3% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
tchiotludo
pushed a commit
that referenced
this pull request
Oct 11, 2023
This fix follow the JDBC heartbeat & task resubmit feature recently released in the 0.12
moadibfr
pushed a commit
that referenced
this pull request
Oct 31, 2023
This fix follow the JDBC heartbeat & task resubmit feature recently released in the 0.12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fix follow the JDBC heartbeat & task resubmit feature recently released in the 0.12
This pull request covers 3 big tasks:
Instead of deleting the workerJobRunning (that allows us to know which task was running on which worker) based on the taskRunId (which was only for the workerTaskRunning), we know use the key (avoiding duplicated data + handling workerTriggerRunning deletion).
WorkerTriggerRunning was not deleting correctly because they do not pass in the executor when they are successful, but in the Scheduler, as this feature is dedicated only to JDBC, a custom workerTriggerResultQueue was created to delete them only in JDBC.
Tests were not sufficient, so I've implemented 2 tests, one for triggers and one for tasks, where we execute a task/trigger, kill the workers, restart a new one and see if the task/trigger is correctly executed