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(run-manager): call shutdown endpoint before workflow stop (#559) #559

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

mdonadoni
Copy link
Member

@mdonadoni mdonadoni commented Jan 23, 2024

Closes #252
Closes #546
Closes reanahub/reana-job-controller#347

@mdonadoni mdonadoni changed the title fix runaway pods feat(run-manager): call shutdown endpoint before workflow stop (#559) Jan 23, 2024
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 23, 2024
…hub#559)

Call the shutdown endpoint of reana-job-controller before stopping a
running workflow, so that running jobs are correctly cleaned up.

Closes reanahub#252
Closes reanahub#546
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 23, 2024
Use exec to execute job-controller, so that the server can receive
signals such as `SIGTERM`.

Closes reanahub/reana-job-controller#347
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 23, 2024
…hub#559)

Call the shutdown endpoint of reana-job-controller before stopping a
running workflow, so that running jobs are correctly cleaned up.

Closes reanahub#252
Closes reanahub#546
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 23, 2024
Use exec to execute job-controller, so that the server can receive
signals such as `SIGTERM`.

Closes reanahub/reana-job-controller#347
Copy link
Member

@giuseppe-steduto giuseppe-steduto left a comment

Choose a reason for hiding this comment

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

Nice and clean approach! I was wondering whether we should increase the
termination grace period to be more sure that the HTTP call is completed, but I guess what really matters is that the request is sent to /shutdown. Then even if the response is not delivered in time to the run-batch pod (because the grace period has passed), the jobs should have terminated anyway.

As for the commit scopes, maybe it's better to always use run-manager rather than workflow-run-manager?

mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 29, 2024
…b#559)

Let reana-job-controller update the status of jobs, as this is not a
concern of reana-workflow-controller, which should manage workflows and
not jobs.
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 29, 2024
…hub#559)

Call the shutdown endpoint of reana-job-controller before stopping a
running workflow, so that running jobs are correctly cleaned up.

Closes reanahub#252
Closes reanahub#546
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 29, 2024
Use exec to execute job-controller, so that the server can receive
signals such as `SIGTERM`.

Closes reanahub/reana-job-controller#347
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 29, 2024
Let reana-job-controller update the status of jobs, as this is not a
concern of reana-workflow-controller, which should manage workflows and
not jobs.
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 29, 2024
…hub#559)

Call the shutdown endpoint of reana-job-controller before stopping a
running workflow, so that running jobs are correctly cleaned up.

Closes reanahub#252
Closes reanahub#546
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 29, 2024
Use exec to execute job-controller, so that the server can receive
signals such as `SIGTERM`.

Closes reanahub/reana-job-controller#347
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2329437) 72.50% compared to head (139728c) 72.83%.

❗ Current head 139728c differs from pull request most recent head 817b019. Consider uploading reports for the commit 817b019 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #559      +/-   ##
==========================================
+ Coverage   72.50%   72.83%   +0.33%     
==========================================
  Files          15       15              
  Lines        1382     1362      -20     
==========================================
- Hits         1002      992      -10     
+ Misses        380      370      -10     
Files Coverage Δ
reana_workflow_controller/config.py 100.00% <100.00%> (ø)
reana_workflow_controller/consumer.py 41.21% <ø> (+2.94%) ⬆️
reana_workflow_controller/workflow_run_manager.py 79.61% <100.00%> (-2.08%) ⬇️

Let reana-job-controller update the status of jobs, as this is not a
concern of reana-workflow-controller, which should manage workflows and
not jobs.
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 30, 2024
…hub#559)

Call the shutdown endpoint of reana-job-controller before stopping a
running workflow, so that running jobs are correctly cleaned up.

Closes reanahub#252
Closes reanahub#546
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this pull request Jan 30, 2024
Use exec to execute job-controller, so that the server can receive
signals such as `SIGTERM`.

Closes reanahub/reana-job-controller#347
)

Call the shutdown endpoint of reana-job-controller before stopping a
running workflow, so that running jobs are correctly cleaned up.

Closes reanahub#252
Closes reanahub#546
Use exec to execute job-controller, so that the server can receive
signals such as `SIGTERM`.

Closes reanahub/reana-job-controller#347
@mdonadoni mdonadoni merged commit 817b019 into reanahub:master Feb 1, 2024
12 checks passed
@mdonadoni mdonadoni deleted the fix-runaway-pods branch February 1, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants