-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Scheduler: don't give tasks to disabled assistants #1839
Scheduler: don't give tasks to disabled assistants #1839
Conversation
@daveFNbuck, as the founder of assistants feature. Do you mind reviewing this? |
Won't we need to add worker logic to kill the assistant after this? It's not ideal if the assistant process stays permanently alive after this. |
Oh. I assumed assistants would break their get_work loop once the scheduler says there's no more tasks. Let me double check this. |
This PR is yet not done although still sensible to review. I need to add tests that actually disable a worker. The tests I've touched upon so far are about sending interrupts to the worker (only vaguely related). |
196f5d3
to
2d06f76
Compare
Feels a bit scary adding another thing to |
2aaa07d
to
d225121
Compare
Looks good, but it's missing a way to tell the viz about whether the worker is disabled. You can't disable a worker if it doesn't have any pending jobs without that. |
It uses whether the worker has any pending tasks to determine whether to On Tue, Sep 13, 2016 at 12:05 AM, Arash Rouhani notifications@github.com
|
Oh, put your safety belt on everyone, I'm going to mess around in frontend land then. ^^ Thanks for the clarification @daveFNbuck, I'll try to see where I can get with this. |
I can do it if this part is too unfamiliar for you. On Tue, Sep 13, 2016 at 9:34 PM, Arash Rouhani notifications@github.com
|
I'll take a stab at it today. If I fail miserably I'll see how we can cooperate :) |
@daveFNbuck, I've got stuck on the I'm editing Can you say what template engine provides |
I also don't know the answer on that one. I've mostly just tweaked around the edges on what was already there. |
@freider @erikbern @stephenpascoe, quick question. Do you know what HTML templating syntax luigi's visualiser uses? See the comment above. |
Oh boy am I excited after my first line of written javascript! Mostly unrelated: Kudos to @fabriziodemaria and everyone involved in the recent improvements to the execution summary and return codes. The summary prints exactly what one expects after disabling the worker: |
Previously assistants would keep getting tasks and never stop. Despite that a user have clicked "disable worker" in the WebUI.
This is so we scan make the WebUI aware of the state. (upcoming commit)
Previously it was equivalent to "has no pending tasks". But because we also associate "greyed out" with "can't click disable", the WebUI have confused at least me for a while. This is also useful because you can now disable the worker while it's still in the scheduling phase.
24a1bc6
to
0886a23
Compare
@daveFNbuck, I would appreciate a final round of review. :) |
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
@@ -308,6 +311,9 @@ <h3 class="box-title">{{name}}</h3> | |||
Running: {{num_running}}<br> | |||
Pending: {{num_pending}}<br> | |||
Unique Pending: {{num_uniques}}<br> | |||
{{#is_disabled}} | |||
This worker is <b>disabled</b>. It will not start on new tasks.<br> |
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.
It will not start new tasks. No "on"
Description
Previously assistants would keep getting tasks and never stop. Despite
that a user have clicked "disable worker" in the WebUI.
Motivation and Context
This is a bugfix.
Have you tested this? If so, how?
I have included unit tests. I have yet to test in production environment.