Skip to content
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

Inconsistency between odo registry output and preference.yaml #4626

Closed
kadel opened this issue Apr 15, 2021 · 7 comments
Closed

Inconsistency between odo registry output and preference.yaml #4626

kadel opened this issue Apr 15, 2021 · 7 comments
Labels
area/registry Issues or PRs related to Devfile registries lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@kadel
Copy link
Member

kadel commented Apr 15, 2021

#4525 introduced support for the new OCI registry and a migration path to it.

Problem is that it also creates inconsistency between what odo registry list shows and what is in preference.yaml.

Ideally, odo should change the preference file as well and store the new registry URL there.

▶ odo registry list
NAME                       URL                                                       SECURE
demo                       https://raw.githubusercontent.com/kadel/registry/demo     No
DefaultDevfileRegistry     https://registry.devfile.io                               No
▶ cat ~/.odo/preference.yaml
kind: Preference
apiversion: odo.dev/v1alpha1
OdoSettings:
  BuildTimeout: 5
  RegistryList:
  - Name: DefaultDevfileRegistry
    URL: https://github.com/odo-devfiles/registry
    secure: false
  - Name: demo
    URL: https://raw.githubusercontent.com/kadel/registry/demo
    secure: false
  ConsentTelemetry: false
@kadel kadel changed the title Inconsistency between odo registry output and `preference.yaml Inconsistency between odo registry output and preference.yaml Apr 15, 2021
@dharmit
Copy link
Member

dharmit commented Apr 16, 2021

▶ odo registry list
NAME                       URL                                                       SECURE
demo                       https://raw.githubusercontent.com/kadel/registry/demo     No
DefaultDevfileRegistry     https://registry.devfile.io                               No

▶ cat ~/.odo/preference.yaml
kind: Preference
apiversion: odo.dev/v1alpha1
OdoSettings:
  BuildTimeout: 5
  RegistryList:
  - Name: DefaultDevfileRegistry
    URL: https://github.com/odo-devfiles/registry
    secure: false
  - Name: demo
    URL: https://raw.githubusercontent.com/kadel/registry/demo
    secure: false
  ConsentTelemetry: false

What I'm seeing is:

❯ cat ~/.odo/preference.yaml
kind: Preference
apiversion: odo.dev/v1alpha1
OdoSettings:
  NamePrefix: dharmit
  BuildTimeout: 3000
  PushTimeout: 480
  RegistryList:
  - Name: DefaultDevfileRegistry
    URL: https://raw.githubusercontent.com/odo-devfiles/registry/master
    secure: false
  Ephemeral: true
  ConsentTelemetry: false

❯ odo registry list         
NAME                       URL                             SECURE
DefaultDevfileRegistry     https://registry.devfile.io     No

The inconsistency I see there is that odo registry list shows only https://registry.devfile.io while preference.yaml has https://raw.githubusercontent.com/odo-devfiles/registry/master.

@dharmit dharmit added the area/registry Issues or PRs related to Devfile registries label Apr 28, 2021
@dharmit
Copy link
Member

dharmit commented Apr 28, 2021

@kadel how does this work? I don't see GH registry in odo registry list wheras registry.devfile.io doesn't show up in ~/.odo/preference.yaml.

So, is registry.devfile.io hardcoded into odo now? Reference change in PR.

How can "we" (as in through some PR) change this inconsistency? From what I understand, it would require one to manually edit the preference.yaml file.

Am I missing something here?

@kadel
Copy link
Member Author

kadel commented Apr 28, 2021

@kadel how does this work? I don't see GH registry in odo registry list wheras registry.devfile.io doesn't show up in ~/.odo/preference.yaml.

If DefaultDevfileRegistry in the preference file is not the new registry.devfile.io it changes it to it.
So the rest of the code is using the new address.
But it does this only "in-memory" without actually updating preference file.

https://github.com/openshift/odo/blob/1156a13b4e28ca5fdc886197a8ef45bfa94be777/pkg/preference/preference.go#L253-L261

How can "we" (as in through some PR) change this inconsistency? From what I understand, it would require one to manually edit the preference.yaml file.

odo should update the preference file instead of just during it just "in-memory" every time.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 27, 2021
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 26, 2021
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this as completed Sep 25, 2021
@openshift-ci
Copy link

openshift-ci bot commented Sep 25, 2021

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Issues or PRs related to Devfile registries lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants