-
Notifications
You must be signed in to change notification settings - Fork 8
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: ps cmd should ignore dead runners #1050
Conversation
Are these runners getting reaped eventually, and if so does the reaping correctly set the module_name to NULL eventually? If not it seems like we should fix that? |
backend/controller/sql/queries.sql
Outdated
@@ -160,7 +160,7 @@ SELECT d.min_replicas, | |||
r.endpoint, | |||
r.labels AS runner_labels | |||
FROM deployments d | |||
LEFT JOIN runners r on d.id = r.deployment_id | |||
LEFT JOIN runners r on d.id = r.deployment_id AND r.state = 'assigned' |
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.
Hmmm actually if we just want to ignore dead runners, this probably isn't the right solution. We probably do want != 'dead'
so that it will also pick up runners that are reserved.
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'm not 100% sure I'm right there, so it would be worth verifying if that does what we want...
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.
Makes sense, will fix
Looking into why it's not being set to null. |
It's the deregister runner code that is setting it to dead in the db without updating But I think the reap case will also end up those columns not nulled out... I'll set this PR back to draft and try recreating that case next week |
d6f9b32
to
ef7ba66
Compare
Handled the above cases and updated PR description |
ef7ba66
to
5cd2373
Compare
fixes #1046
Runners that were found to have died (rather than cleanly being killed) end up with deployment_id & module_name not set to null.
Changes:
ps
commanddeployment_id
andmodule_name
to null in the following cases: