-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support backward compatibility for old profiles #7062
Comments
Possibly related to #6969 (not sure if it is enough) |
Thanks a lot @afbjorklund for the prompt reply. I think the PR you mentioned took it to a good position, but I still get invalid profile due to the attribute "Driver" instead for "VMDriver". This is where it fails: minikube/pkg/minikube/config/profile.go Line 43 in 82900a7
|
So related to #6620 - @sharifelgamal ? |
Yep, that accidentally broke the profiles list command. It's fixable. |
I have been thinking about this, I think we can solve this elegantly by creating a mapping between a released version (in which the config format is changed) and a corresponding function to load the profile and translate it to the latest version. Once the user wants to load a profile, the loader would try each mapping starting from the latest version until the earliest version we want to support, and we provide a message output as well (maybe a string property in the Profile we call I wrote about my experience about older profile here in case it helps with this issue: https://www.emadashi.com/2020/03/how-to-fix-minikube-invalid-profile/ This will require some work, but would much better experience. If there is enough pain out there it might be worth it. |
I can take the first stab implementing this if you folks like the idea. |
I like the idea of automatically translating from the old profile format to the new one, I would hope that we wouldn't change the format so often that need to formally version each release, but I would be happy to review a PR to fix this. |
Hey @eashi -- are you still working on this? |
Hey @priyawadhwa , I have created a draf PR to consult with the maintainers if this is a direction they are comfortable with. I didn't receive any comments on the PR and I didn't want spend time on it without the guidance. I would love to come back to it and work on it more, but I need the feedback above :). |
Hey @eashi thank you! I didn't notice the draft PR -- I just opened up the PR to give it some visibility. I'll try to take a look at it in the next couple days. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Fixed in v1.12. |
I have installed the latest minikube version v1.8.1 (I can't remember the previous version), but then all my clusters wouldn't work because their profiles became invalid.
I checked the code that reads the configuration from the profile and obviously the structure of the profile has changed.
I suggest to keep the profiles backward compatible as far back as possible, and display warnings about attributes that will be changed in the profile rather than prompting the users to delete the profile.
If you feel that's the right way I can start with putting back some of the renamed attributes?
The exact command to reproduce the issue:
minikube profile list
The full output of the command that failed:
keda-external-scaler
minikube
twitch-keda
twitter-scaler
💡 You can delete them using the following command(s):
$ minikube delete -p keda-external-scaler
$ minikube delete -p minikube
$ minikube delete -p twitch-keda
$ minikube delete -p twitter-scaler
The operating system version:
MacOS Catalina
The text was updated successfully, but these errors were encountered: