-
Notifications
You must be signed in to change notification settings - Fork 244
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
odo default registry migration/update #3298
Comments
This one’s tricky because it can be hard to tell if a missing default registry is due to a new one being added in odo, or if the user chose to remove it. We don’t want to be adding back default registries that the user explicitly removed. Maybe we need to consider not ever storing the default registries in the preferences.yaml (but still providing a way to disable them). Then we wouldn’t hit the issue of a user not getting new default registries? @maysunfaisal WDYT? |
Not sure if we want to allow users to disable default but not storing default in preference.yaml is one way of solving this 🤔 |
We allow users today to remove/disable the default registries, don’t we? |
Exactly, this one is tricky. We do have a mechanism to cover the cases below:
But we don't cover the case where users missing one new default registry for devfile v2 (either user doesn't have it or user has it but remove it), if we want to still use the same mechanism above for supporting migration we can provide a one time migration script/way to force user to only add the new devfile v2 registry, then we don't need to change the existing code base. Another alternative is that we can merge devfile v1 registry and devfile v2 registry to let one GitHub repo hosts two registries, then we don't have this migration issue. Regarding @johnmcollier 's question
Yes, we allow |
Merging the devfile registries won't prevent the issue from occurring again if the default devfile registry URLs are changed (or new default ones are added) |
Btw, yes we allow delete on default registries. Ignore my prev comment regd it. |
For that alternative, definitely there are some limitations. If want to make it work, we have to always use the same URL and only provide one default registry. All changes will be made on upstream/GitHub side such as creating separate folders to host v1 and v1 devfiles under one GitHub repo, and no new default registry can be added in the future. |
I think that this might be a good way forward. We would just have a preference that would indicate if the default registry should be used or not, but the actual URL would be in the code. To migrate existing users to this new approach, we could simply delete BTW: I've forked @elsony's devfile v2 registry into https://github.com/odo-devfiles/registry we could start using that to avoid using personal github namespaces. |
There is already another issue related to this. #3249 |
This is a good approach, one disadvantage I can think of is that user couldn't remove specific default registry as we don't store the URL on disk, IIUC we only provide option to let user enable/disable all default registries. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/remove-lifecycle rotten this is still valid |
This is no longer valid in odo v3. /close |
@kadel: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind user-story
User Story
As a user I should be able to get the updated default registry whenever the default registries change in odo.
This was first noticed when adding the default devfile v2 registry https://github.com/elsony/devfile2-registry
Case 1: User does not have registries in preference. Automatically Updated!
No registries in preference:
Before adding a new default registry in odo:
After adding a new default registry
DefaultDevfileV2Registry2222
in odo:The change is picked up automatically 👍
Case 2: User does have registries in preference. Needs Manual Update!
Registries in preference:
Before adding a new default registry in odo:
After adding a new default registry
DefaultDevfileV2Registry3333
in odo:It still has the old registry. The change is not picked up automatically 👎
Workaround to update:
Delete the preference from home dir
Set up new preference
New default registry is now reflected
Acceptance Criteria
Links
The text was updated successfully, but these errors were encountered: