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
[bugfix] Using unlisted_choice a second time doesn't work #766
Conversation
I'm catching up a bit with how this is implemented initially and just learned about the kubespawner/kubespawner/spawner.py Lines 1541 to 1551 in 0e5bb46
My understanding is that this PR breaks the documented behavior of reading both keys and values in Here is a snippet from a test config that helps me think. I understand it as it won't matter what we set as a value to the kubespawner/jupyterhub_config.py Lines 46 to 55 in 0e5bb46
How flexible do we want this feature to be?
I'm fine with the idea of reducing the complexity to no longer supporting the string templates as I think this PR does. If we go for that and I understood how things worked, the docs should just be updated first to not mention |
Thanks for digging into this, @GeorgianaElena! I would love for us to keep the Do you know why this behavior differs on first use vs second? |
@yuvipanda, @consideRatio, I think I found the actual culprit. The part where the dict of overrides is constructed: kubespawner/kubespawner/spawner.py Lines 3157 to 3162 in 8f43b50
wasn't the issue. |
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.
Nice work figuring this out @GeorgianaElena, it looks great!
Multiple usages of the unlisted_choice option result in the same first introduced input to be used. If another pre-selected image is used, that works.
This is
because we're assuming to find the defaultEDIT: because we worked on an object that shouldn't be changed instead of a copy by mistake{value}
of the override, which is not the case after the first override was applied.This PR:
Reference: 2i2c-org/infrastructure#2887 and #772