-
Notifications
You must be signed in to change notification settings - Fork 305
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
Fix #761 expand pvc_name outside of init #820
base: main
Are you sure you want to change the base?
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
@@ -2662,6 +2660,8 @@ async def _make_create_resource_request(self, kind, manifest): | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_name
andsecret_name
outside of__init__
.\cc @yuvipanda