jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.03k stars 339 forks source link

added `remove_named_servers` setting for jupyterhub-idle-culler #855

Closed stevejpurves closed 1 year ago

stevejpurves commented 1 year ago

If you are using TLJH with named servers, it can be a requirement that the server is removed when culled. This PR is to expose the underlying IdleCuller option, allowing it to be set via tljh-config.

welcome[bot] commented 1 year ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

stevejpurves commented 1 year ago

I noted some issues with the test suite while getting this to go green. It seems like he mock config can leak between tests meaning it was not possible to add a test for remove_named_servers independently of users.

Also I added a test case where potentially the existing test case for services could be extended instead -- let me know if I should change that.