NASA-IMPACT / veda-jupyterhub

VEDA JupyterHub technical planning and documentation
1 stars 1 forks source link

Objective JH-4: Group based shared folders #44

Open batpad opened 2 months ago

batpad commented 2 months ago

Motivation

Currently, we have the following 2 sets of shared folders available for all users:

While GitHub repositories are the primary means for groups to collaborate on code, it’s still very useful to have a lightweight way for users within a group to have a space just for themselves. This was asked for by at least two separate groups (EIS Fire and the GHG workshop that was supported) during the last quarter.

Proposal

For groups that ask for it, we set up shared/ directories that are visible (read-write) only to members who belong to that group. This would be similar to the shared-public directories, but group restricted.

Owners

Success Criteria

yuvipanda commented 2 months ago

The way to realize this is to set up extra volumeMounts based on user's group membership. This would be doable with https://github.com/jupyterhub/jupyterhub/pull/4822. That was merged last month, and should be in a release soon.

However, volume_mounts (https://github.com/jupyterhub/kubespawner/blob/593405d24af017bc759b6763a0a2af8af4de0f38/kubespawner/spawner.py#L1066) is what needs to be overrriden, and it's a List not a Dict. This means we can not simply add more volume mounts based on user group membership - only replace the whole list. This is because Lists can not be merged, only dictionaries can be merged.

So we'd need to allow for volume_mounts to be either a List (for backwards compatibility) or a Dict.

So to complete this objective, we'll need to:

This will take a bit of time, although the total amount of work done is limited.

One of my goals is to find more ways for @sunu (or @batpad?) to contribute to the Jupyter ecosystem, with the eventual goal of becoming a maintainer (if that is something you want, of course :)). To that end, I think it would be useful for you to do steps (1) and (2)? I can either review them myself, or find time for review from others.

batpad commented 1 week ago

@sunu @yuvipanda I think we hit our goals for this quarter in terms of making the required changes to upstream projects to be able to do this work. I believe we now need to wait for releases of the upstream projects to be able to configure and integrate onto the hubs. Could one of you give a quick update of where we are with that and what this needs to get over the line to be implemented on our hubs?