-
Notifications
You must be signed in to change notification settings - Fork 304
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
Create new labels that we can switch over to later #836
Comments
Yes, subject to discussion about what we escape and how since it may affect more than just labels. Given this could be a breaking change that affects users I think we should discuss these together, and ensure there's a coherent plan that minimises pain for admins (how do they deal with the breaking changes) and for us as developers (will we maintain multiple code paths temporarily, or indefinitely)? For many JupyterHub PRs we can merge without resolving all issues since the impact of the PR is limited and can be easily changed, but because the issues discussed here have a big impact on JupyterHub admins I think we should have a coherent plan. It might be that the consensus is that #835 is fine in isolation since the escaping issues will take too much time to fix! But I think it should be a deliberate decision. |
I agree on minimizing effort for users and maintainers, and if you think there is a coupling here I'll investigate further. Tech summary
KubeSpawner labels to consider
KubeSpawner functions to consider
My conclusions
My takeawayI think its good to address #737, #744, #791 now as doing so is breaking for software outside jupyterhub's official software referencing those labels values, and getting a breaking change to land in kubespawner ~now is great as it allows us to flush it into z2jh 4 with other breaking changes demanding users attention. I see no reason to wait doing #737, #744, #791 until we maybe in the futuer remove |
It seems #744 is making a change that would influence if self.enable_user_namespaces:
self.namespace = self._expand_user_properties(self.user_namespace_template)
self.pod_name = self._expand_user_properties(self.pod_name_template)
self.dns_name = self.dns_name_template.format(namespace=self.namespace, name=self.pod_name)
self.secret_name = self._expand_user_properties(self.secret_name_template)
self.pvc_name = self._expand_user_properties(self.pvc_name_template)
if self.working_dir:
self.working_dir = self._expand_user_properties(self.working_dir) Overall, this makes #744 far more complicated to land than if it just touched the labels =/ |
My feeling is that breaking changes are fine as long as there's no risk of data loss. Restarting user's pods is disruptive but it's very rare that it's required by a Z2JH release. Kubernetes upgrades require all pods to restart, and Kubernetes upgrades are much more frequent! Changes to pvc_name and namespace are obviously more problematic, perhaps we should store more information in the state similar to jupyterhub/dockerspawner@05f5433 from jupyterhub/dockerspawner#386 ? |
Not at a single point in time though! When upgrading in 2i2c clusters, i rotate out old node pools and rotate in new. K8s upgrades are almost entirely non-disruptive this way.
Hmmm, a common situation is that the username expansion is used to declare a subPath on a NFS mount as well, so even changing how the username expands can be breaking. I've not looked at the linked PR yet, I'm on mobile atm, but I'm hesitant to try handle the complexity of a transition, but more optimistic on doing a switch where new z2jh deploys get new defaults and old deploys retains previous function unless they opt-in - including then breaking changes. |
Ah hmm okay so we have built in functionality in Spawner base class to retain state as documented in https://jupyterhub.readthedocs.io/en/stable/reference/spawners.html#spawner-state, nice - but is it reasonable? So we would then ask "is this a new user-server that hasn't been spawned before - then let's do X instead of Y" for each user server? Hmmm... I think overall, this is also too complicated and fragile:
|
Current takeKubeSpawner
Z2JH
|
I left a message in #835 (comment) |
Extracted from #835 (comment):
Extracted from #835 (comment)
@manics I think I get what you mean now with
this might be a good opportunity
- you mean that getting these new labels out at the same time as #835, makes us able to switchover with a single breaking change in the future with the same pre-conditions (that users have used kubespawner a while with duplicated sets of labels)?The text was updated successfully, but these errors were encountered: