Skip to content
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

Prepare for deprecation of Authenticator.db #207

Open
minrk opened this issue May 5, 2022 · 1 comment
Open

Prepare for deprecation of Authenticator.db #207

minrk opened this issue May 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@minrk
Copy link
Member

minrk commented May 5, 2022

JupyterHub will (not sure how soon) deprecate the Authenticator.db property, because the lifecycle of that property is a problem, and Authenticators and Spawners generally shouldn't ever need access to the JupyterHub db, and certainly shouldn't have access to a shared session on that db.

xref: jupyterhub/jupyterhub#3700

Proposed change

Make NativeAuthenticator's db session independent of the Hub's internal db session. Creating a new Session against the same database (i.e. starting from db_url instead of db) should be fine, especially since NativeAuthenticator's tables are already independent (related to #28, which I think crosses an internal implementation-detail line).

I think this may need some support from JupyterHub to get the necessary info. Worst case: duplicating db_url config from JupyterHub -> NativeAuthenticator. But since the tables are independent, there's actually no reason other than convenience of configuration for the two to share the same db at all, let alone db session.

Alternative options

  • Wait for Authenticator.db to be removed, and stop working.
  • Request new db_session() factory API to create a session on the db that isn't shared with JupyterHub

Who would use this feature?

All future deployments of JupyterHub with NativeAuthenticator

@minrk minrk added the enhancement New feature or request label May 5, 2022
@welcome
Copy link

welcome bot commented May 5, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant