Skip to content
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(core): add new stop method WorkerJobLifecycle #3767

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

fhussonnois
Copy link
Member

part-of: #3734
part-of: kestra-io/plugin-kafka#75

fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 17, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 17, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 17, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 17, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 17, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 17, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 17, 2024
Copy link
Member

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

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

The issue is that if signalStop is not-blocking, then we will interrupt the thread leading to the task being not stopped gracefully.

I think we will need something more advanced like a way to wait "for a certain amount of time" for the thread to stop then killing it.

fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 21, 2024
Copy link

sonarcloud bot commented May 21, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
66.7% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 21, 2024
@fhussonnois fhussonnois changed the title WIP feat(core): add new stop method WorkerJobLifecycle feat(core): add new stop method WorkerJobLifecycle May 21, 2024
@fhussonnois
Copy link
Member Author

@loicmathieu, Now, part of the worker shutdown process we await for the realtime triggers to complete stopping before interrupting them with Thread.interrupt in last resort. The configured termination grace period is a used as the max timeout for waiting for realtime triggers.

Copy link
Member

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

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

I like where it goes ;)

I wonder if the other Thread may be refactor to do the same (or to provide the ability to do the same). Let's keep that in mind for later and merge this one asap.

@fhussonnois fhussonnois merged commit 7f6881d into develop May 21, 2024
5 of 6 checks passed
@fhussonnois fhussonnois deleted the feat/gh-3734 branch May 21, 2024 13:43
fhussonnois added a commit to kestra-io/plugin-redis that referenced this pull request May 21, 2024
fhussonnois added a commit to kestra-io/plugin-aws that referenced this pull request May 21, 2024
fhussonnois added a commit to kestra-io/plugin-redis that referenced this pull request May 21, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 21, 2024
fhussonnois added a commit to kestra-io/plugin-kafka that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-redis that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-aws that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-pulsar that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-pulsar that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-pulsar that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-azure that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-azure that referenced this pull request May 22, 2024
fhussonnois added a commit to kestra-io/plugin-amqp that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-amqp that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-amqp that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-amqp that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-mqtt that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-mqtt that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-nats that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-nats that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-nats that referenced this pull request May 23, 2024
fhussonnois added a commit to kestra-io/plugin-nats that referenced this pull request May 23, 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.

None yet

2 participants