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

integrating odo registry into odo preference #5402

Closed
Tracked by #5312
kadel opened this issue Jan 28, 2022 · 8 comments · Fixed by #5472
Closed
Tracked by #5312

integrating odo registry into odo preference #5402

kadel opened this issue Jan 28, 2022 · 8 comments · Fixed by #5472
Assignees
Labels
area/registry Issues or PRs related to Devfile registries priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Milestone

Comments

@kadel
Copy link
Member

kadel commented Jan 28, 2022

odo preference

Configures odo behavior like timeouts or registries that odo uses.

The behavior is mostly the same as in v2. We can just remove some fields from the preference.

  • NamePrefix - remove
  • BuildTimeout - remove
  • Timeout - add explanations
  • PushTimeout - add explanations
  • Ephemeral - keep
  • ConsentTelemetry - keep
  • UpdateNotification - keep

The odo registry command should be integrated into odo preference as odo preference registry subcommand and removed from top level commands.

odo preference view should include list of the configured registries

examples

odo preference registry add CheRegistry https://che-devfile-registry.openshift.io

odo preference registry list

odo preference view

odo preference set UpdateNotification false
@kadel kadel added this to the 3.0 (planning) milestone Jan 28, 2022
@kadel kadel changed the title integrating odo registry into odo preference integrating odo registry into odo preference + cleanup Jan 28, 2022
@kadel kadel added the v3 label Jan 28, 2022
@kadel kadel changed the title integrating odo registry into odo preference + cleanup integrating odo registry into odo preference Jan 28, 2022
@joshira-rh joshira-rh assigned joshira-rh and dharmit and unassigned joshira-rh Jan 31, 2022
@joshira-rh joshira-rh added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jan 31, 2022
@dharmit dharmit moved this to For Consideration in odo - sprint 214 Jan 31, 2022
@dharmit dharmit removed their assignment Jan 31, 2022
@joshira-rh joshira-rh added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Jan 31, 2022
@cdrage cdrage moved this from For Consideration to Todo in odo - sprint 214 Feb 1, 2022
@cdrage cdrage moved this from Todo to For Consideration in odo - sprint 214 Feb 1, 2022
@dharmit
Copy link
Member

dharmit commented Feb 2, 2022

  • Timeout - add explanations

  • PushTimeout - add explanations

We have been using int for all timeouts so far. I suggest using time.Duration for it. We can use DurationVar instead of IntVar from cobra point of view.

@kadel
Copy link
Member Author

kadel commented Feb 2, 2022

We have been using int for all timeouts so far. I suggest using time.Duration for it. We can use DurationVar instead of IntVar from cobra point of view.

What is the benefit o using DurationVar if the user will always specify timeout in seconds?

@cdrage
Copy link
Member

cdrage commented Feb 2, 2022

Mind if I get explanations for the changes?

For:

NamePrefix - remove - I understand this, we are just going to automatically create the component names.
BuildTimeout - remove - what do we replace this with? do we just implement a hardcoded default?
Timeout - add explanations - What kind of explanation? Does this take over build timeout?
PushTimeout - add explanations - explain that this is for deploy or something?

ping @kadel

@dharmit
Copy link
Member

dharmit commented Feb 2, 2022

What is the benefit o using DurationVar if the user will always specify timeout in seconds?

Two benefits that I can think of:

  • Not having to convert int to time.Duration as the values are now in time.Duration by default.
  • Clearer CLI documentation, IMO. For example, odo watch -h from main branch looks like:
    $ odo watch -h
    ....
    --delay int              Time in seconds blah blah blah (default 1)
    ....
    But with --delay being set to DurationVar, here it is:
    $ odo watch -h
    ....
    --delay duration         Time in seconds blah blah blah (default 1s)
    ....

@cdrage
Copy link
Member

cdrage commented Feb 2, 2022

Also, registrycachetime still exists in odo code, see: https://github.com/redhat-developer/odo/search?q=registrycachetime&type=code

Are we still keeping that variable too?

cdrage added a commit to cdrage/odo that referenced this issue Feb 2, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
@joshira-rh joshira-rh removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Feb 3, 2022
@joshira-rh joshira-rh moved this from For Consideration to In Progress in odo - sprint 214 Feb 3, 2022
@joshira-rh joshira-rh added points/3 area/registry Issues or PRs related to Devfile registries labels Feb 3, 2022
cdrage added a commit to cdrage/odo that referenced this issue Feb 3, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
cdrage added a commit to cdrage/odo that referenced this issue Feb 3, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
cdrage added a commit to cdrage/odo that referenced this issue Feb 3, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
cdrage added a commit to cdrage/odo that referenced this issue Feb 3, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
@kadel
Copy link
Member Author

kadel commented Feb 4, 2022

BuildTimeout - remove - what do we replace this with? do we just implement a hardcoded default? Timeout - add explanations - What kind of explanation? Does this take over build timeout? PushTimeout - add explanations - explain that this is for deploy or something?

@cdrage I'm afraid that you will have to check code what those timeouts actually do. I don't remember from top of my head and the description that we have for them doesn't help at all. :-/

Also, registrycachetime still exists in odo code, see: https://github.com/redhat-developer/odo/search?q=registrycachetime&type=code
Are we still keeping that variable too?

Yes, it will be still in use so we should keep it.

@cdrage cdrage moved this from In Progress to Ready for Review in odo - sprint 214 Feb 4, 2022
cdrage added a commit to cdrage/odo that referenced this issue Feb 4, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
cdrage added a commit to cdrage/odo that referenced this issue Feb 7, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
cdrage added a commit to cdrage/odo that referenced this issue Feb 7, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
cdrage added a commit to cdrage/odo that referenced this issue Feb 9, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
openshift-merge-robot pushed a commit that referenced this issue Feb 10, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
@cdrage cdrage moved this from Ready for Review to Done in odo - sprint 214 Feb 10, 2022
@cdrage
Copy link
Member

cdrage commented Feb 10, 2022

#5428

Has been merged in!

@cdrage cdrage closed this as completed Feb 10, 2022
kadel pushed a commit to kadel/odo that referenced this issue Feb 21, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
@kadel kadel mentioned this issue Feb 21, 2022
13 tasks
@feloy
Copy link
Contributor

feloy commented Feb 22, 2022

Reopening the issue as the odo registry command still exists

@feloy feloy reopened this Feb 22, 2022
cdrage added a commit to cdrage/odo that referenced this issue Aug 31, 2022
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR does the following:
- Moves "registry" to preference
- Gets rid of unused preference configuration options
- Reorders the parameters for preference for the usage in --help

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

redhat-developer#5402

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
@rm3l rm3l added the v3 label Oct 7, 2022
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 priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants