-
Notifications
You must be signed in to change notification settings - Fork 37
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
How configurable should the culler be? #9
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
To me, a plugin system seemed like a bit overkill - I see JupyterHub as the "cron manager" that runs the scripts. But it is a good point that there is a lot of duplication to do a little bit more. I'll comment there, but I think the question of what to do in the core would still be relevant. but we'll see... |
In #8 we first discussed the option of a plugin system but I am definitely open to other versions as well. I prefer a system where it is easy to find reference implementations. Hence I support alternative 2 to have some versions upstream or maybe another alternative and in addition a collection of the most noteworthy forks somewhere, maybe in the readme? My reasoning is this: Whoever is new to Jupyter in general and JupyterHub in specific might feel overwhelmed when they need to gather all information by browsing random github repositories (I mean probably interesting forks). I prefer that the Openly speaking I do not have deep knowledge about with which programming patterns this aim is achieved in the most time-efficient way. For me people (i.e. communication and sharing existing solution) come before the beauty of code. To avoid confusion about what the culler service does, maybe logging can help? Still we need to be careful though. |
I think we can separate the discussion around avoiding user confusion from the decision on implementation. For example, if we go down the route of separate plugins/extensions in their own repositories (and separate pypi packages) then Other factors to consider when deciding whether to have multiple implementations in this repo vs separate ones is ease of testing and maintenance. Regardless of which option we choose as @rkdarst mentioned we still need to decide on an API. |
That seems to be a nice idea! In another context @yuvipanda suggested a pluggy-based plugin system. Whenever we need a plugin hook in the lengthy |
I was just taking a look here at how I could slot in custom cull logic and noticed that unlike a bunch of other JupyterHub stuff this isn't using traitlets. Any reason we don't just convert to that and make the cull logic a configurable Callable? |
@rcthomas none that I am aware of. |
I don't know how much work will be involved in converting it to use traitlets and a configuration file, but it sounds like it should be easier than implementing a plugin system. |
This issue has been mentioned on Jupyter Community Forum. There might be relevant details there: https://discourse.jupyter.org/t/a-cull-idle-user-service-that-deletes-pvs/4742/16 |
I opened #25 to discuss adding some general purpose hooks. JupyterHub's Spawner and Authenticator class have various hooks for example that can be customized, and I think those serve a very useful hatch for users without making maintenance of the project problematic.
I opened the issue as I felt #25 was as far as I think we should go with configuration flags etc, and that the rest should be left for custom logic implemented in some way from the end user. |
Now that the culler is installable, a question is: how should the culler be customized? Previously, it was via making a copy and modifying it. Now, there is one blessed, easy to install version - what happens to others?
In one way, I am very happy it's a separate repo now, so that it's straightforward (possibly not easy, though) to maintain a long-running fork. On the other hand, it means now I need to actually think about what's the best way, and coordinate...
Alternative options
Based on really quick thinking:
pip install https://...
from own github fork in special branch.culltime
element in the spawner state to decide when it can be culled.)Who would use this feature?
I have two hubs and they both have customized cullers. I've seen enough other issues about the culler that I imagine that others customize it, too.
(Optional): Suggest a solution
I hope to make a PR soon that will demonstrate something we probably don't take.
The text was updated successfully, but these errors were encountered: