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

Should "odo list" not fail when not logged into the OpenShift cluster? #2444

Closed
dharmit opened this issue Dec 10, 2019 · 4 comments · Fixed by #2690
Closed

Should "odo list" not fail when not logged into the OpenShift cluster? #2444

dharmit opened this issue Dec 10, 2019 · 4 comments · Fixed by #2690
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/user-story An issue of user-story kind priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects

Comments

@dharmit
Copy link
Member

dharmit commented Dec 10, 2019

User Story

As a user or (ide plugin) I would like to list all components in a given path and I should not be required to be connected to the cluster.

Current behaviour

# not logged into OpenShift (CRC) yet
$ odo list --path ~/src
APP     NAME         TYPE       SOURCE                      STATE          CONTEXT
app     backend      java       target/wildwest-1.0.jar     Not Pushed     /home/dshah/src/Wild-West-Backend
app     frontend     nodejs     ./                          Not Pushed     /home/dshah/src/Wild-West-Frontend
app     node         nodejs     ./                          Not Pushed     /home/dshah/src/nodejs-ex

# let's login
$ odo login -u developer
Connecting to the OpenShift cluster

Authentication required for https://api.crc.testing:6443 (openshift)
Username: developer
Password: 
Login successful.

You have one project on this server: "myproject"

Using project "myproject".

# now it shows the components' STATE as Pushed!
$ odo list --path ~/src
APP     NAME         TYPE       SOURCE                      STATE          CONTEXT
app     backend      java       target/wildwest-1.0.jar     Pushed         /home/dshah/src/Wild-West-Backend
app     frontend     nodejs     ./                          Pushed         /home/dshah/src/Wild-West-Frontend
app     node         nodejs     ./                          Not Pushed     /home/dshah/src/nodejs-ex

Acceptance Criteria

  • odo list --path should work without odo being logged or connected to the cluster
  • if odo list --path command can't determine the correct state (Pushed, Not Pushed), because it is not connected to the cluster, the component should have an Unknown state.
    Example:
    $ odo list --path ~/src
    APP     NAME         TYPE       SOURCE                      STATE          CONTEXT
    app     backend      java       target/wildwest-1.0.jar     Unknown     /home/dshah/src/Wild-West-Backend
    app     frontend     nodejs     ./                          Unknown     /home/dshah/src/Wild-West-Frontend
    app     node         nodejs     ./                          Unknown     /home/dshah/src/nodejs-ex
    
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 10, 2019
@kadel
Copy link
Member

kadel commented Dec 10, 2019

Should it not fail? This gives a false indicator that the components are not pushed and user might try to do odo push instead.

The command should NOT fail. odo list --path ~/src intention is to find components, and cluster connection shouldn't be required.
But the current behavior is also not correct and can be misleading.

If we can't verify the state of the component for some reason, we should show unknown state.

$ odo list --path ~/src
APP     NAME         TYPE       SOURCE                      STATE          CONTEXT
app     backend      java       target/wildwest-1.0.jar     Unknown     /home/dshah/src/Wild-West-Backend
app     frontend     nodejs     ./                          Unknown     /home/dshah/src/Wild-West-Frontend
app     node         nodejs     ./                          Unknown     /home/dshah/src/nodejs-ex

/priority medium

@openshift-ci-robot openshift-ci-robot added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Dec 10, 2019
@girishramnani girishramnani added this to For concideration in Sprint 178 via automation Jan 7, 2020
@girishramnani
Copy link
Contributor

This issue seems well defined in terms of what work needs to be done. So no further analysis needed in my opinion.

@kadel
Copy link
Member

kadel commented Jan 8, 2020

/triage ready

@girishramnani girishramnani removed this from For consideration in Sprint 178 Jan 27, 2020
@girishramnani girishramnani added this to For consideration in Sprint 179 via automation Jan 27, 2020
@openshift-ci-robot openshift-ci-robot added the kind/user-story An issue of user-story kind label Jan 29, 2020
@kadel kadel removed the state/Ready label Feb 14, 2020
@kadel kadel added this to For consideration in Sprint 180 via automation Feb 14, 2020
@kadel kadel removed this from For consideration in Sprint 179 Feb 14, 2020
@adisky
Copy link
Contributor

adisky commented Mar 3, 2020

/assign

@girishramnani girishramnani added this to For consideration in Sprint 181 via automation Mar 9, 2020
@girishramnani girishramnani removed this from For consideration in Sprint 180 Mar 9, 2020
@girishramnani girishramnani moved this from For consideration to To do in Sprint 181 Mar 9, 2020
@adisky adisky moved this from To do to For review in Sprint 181 Mar 30, 2020
@girishramnani girishramnani removed this from For review in Sprint 181 Mar 30, 2020
@girishramnani girishramnani added this to For consideration in Sprint 182 via automation Mar 30, 2020
@girishramnani girishramnani moved this from For consideration to For review in Sprint 182 Mar 30, 2020
@girishramnani girishramnani moved this from For review to In progress in Sprint 182 Mar 30, 2020
Sprint 182 automation moved this from In progress to Done Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/user-story An issue of user-story kind priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
No open projects
Sprint 182
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants