Fix #761 expand pvc_name outside of init - #820
Conversation
|
Thanks for submitting your first pull request! You are awesome! 🤗 |
|
I've added the breaking label since this changes method signatures that may be used by subclasses. |
for more information, see https://pre-commit.ci
|
|
||
| async def _start(self): | ||
| """Start the user's pod""" | ||
| pvc_name = self._expand_user_properties(self.pvc_name_template) |
There was a problem hiding this comment.
I've been looking at this in #744, and pvc_name should actually be one of the things persisted in Spawner state, because the pvc name should probably be preserved to avoid data loss even if it. Resolving the template here would ensure the new template is used and the old pvc is orphaned. But that's intended when overrides are used as in #761.
Should we:
- not try to track existing pvcs (status quo, this PR), or
- try not to lose data (what I'm trying to do in add 'safe' slug scheme #744)
If we should try not to lose data, how do we distinguish between a changed pvc for a profile (should change) vs config (should not change if prior pvc already created)?

Partial fix for #761 by moving the expansion of
pvc_nameandsecret_nameoutside of__init__.\cc @yuvipanda