-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Don't start dashboard agent when missing dependencies #17966
Don't start dashboard agent when missing dependencies #17966
Conversation
@richardliaw do you have any pointers to tests we have for the minimal vs default distribution? Not sure if there's an existing way to test the behavior with a specific set of deps. |
Ok, it looks like our exit code detection doesn't actually work :( this always returns 0 because it's using some file descriptor magic to determine if the process died... |
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.
Oh nice! The fix is simple :)
Nvm.. just saw your message...
Maybe we can have some retry count with exponential backoff? Like 10ms -> 20ms -> 40ms -> 80ms -> 2s -> 10s -> stop restarting |
Yeah @rkooo567 I was thinking something similar... we can try restarting it some number of times and if it never succeeds then we stop restarting all together. Another option would be to just continue restarting at some long interval forever. |
We may also be able to just avoid spawning the agent altogether if we don't have the right deps... let me see how hard that would be |
c140382
to
b663e11
Compare
@edoakes I actually feel like this approach can be pretty nice and provide clean error messages.
I think this is something we can do;
|
…dashboard-agent-restart
@rkooo567 I agree that would probably be improved logic for the restarting, but I think the best solution here is to just avoid starting the agent when we know it will fail (it's a self-inflicted problem...). @fyrestone @richardliaw I updated the PR to standardize how we do this for the dashboard and agent, please have another look. |
Sure. I think we can just do better restarting / error message in other PRs. (it seems to be important for usability). I can create an issue for that |
Why are these changes needed?
Avoids spawning the agent altogether if the relevant dependencies are missing. We use the presence of some required optional pip packages for the check here, so it's important to keep them in sync between the dashboard code and the check to start it. This is achieved by moving optional dependencies to their own submodule within the dashboard, which is imported both by the code that decides whether or not to start the dashboard and the code in the dashboard that actually uses the packages.
Related issue number
Closes #17965
Checks
scripts/format.sh
to lint the changes in this PR.