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

odo list showing a duplicate entry of devfile component #4144

Closed
girishramnani opened this issue Oct 24, 2020 · 4 comments · Fixed by #4177
Closed

odo list showing a duplicate entry of devfile component #4144

girishramnani opened this issue Oct 24, 2020 · 4 comments · Fixed by #4177
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).

Comments

@girishramnani
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System:

**Output of odo version: odo master

How did you run odo exactly?

girish@MacBook-Pro rtr % odo project create girishn
 ✓  Project 'girishn' is ready for use
 ✓  New project created and now using project: girishn

(base) girish@MacBook-Pro rtr % odo project set girishn   
Already on project : girishn

(base) girish@MacBook-Pro rtr % odo create nodejs --starter --app new-app
...
Starter Project
 ✓  Downloading starter project nodejs-starter from https://github.com/odo-devfiles/nodejs-ex.git [2s]
Please use `odo push` command to create the component with source deployed

(base) girish@MacBook-Pro rtr % odo list
Devfile Components: 
APP         NAME       PROJECT     TYPE       STATE
new-app     nodejs     girishn     nodejs     Not Pushed

(base) girish@MacBook-Pro rtr % odo app list                             
There are no applications deployed in the project 'girishn'

(base) girish@MacBook-Pro rtr % odo push
...
Pushing devfile component nodejs
 ✓  Changes successfully pushed to component

Actual behavior

(base) girish@MacBook-Pro rtr % odo list --project girishn --all-apps
Devfile Components: 
APP         NAME       PROJECT     TYPE       STATE
new-app     nodejs     girishn     nodejs     Pushed


Openshift Components: 
APP         NAME       PROJECT     TYPE       SOURCETYPE     STATE
new-app     nodejs     girishn     nodejs                    Pushed

as well as --app new-app

(base) girish@MacBook-Pro rtr % odo list --project girishn --app new-app
Devfile Components: 
APP         NAME       PROJECT     TYPE       STATE
new-app     nodejs     girishn     nodejs     Pushed


Openshift Components: 
APP         NAME       PROJECT     TYPE       SOURCETYPE     STATE
new-app     nodejs     girishn     nodejs                    Pushed

Expected behavior

(base) girish@MacBook-Pro rtr % odo list --project girishn --app new-app
Devfile Components: 
APP         NAME       PROJECT     TYPE       STATE
new-app     nodejs     girishn     nodejs     Pushed

Any logs, error output, etc?

This has been happening after the #4007
And the reason is
https://github.com/openshift/odo/blob/b1245a533788614a7430b086b663b3a24e3f777f/pkg/component/component.go#L859
List function code in component code lists both deployment and deployment Configs. This was done to make the odo app implementation streamlined. But due to this odo list fetches deployment while it tries to fetch the devfile components and then again fetches deployments and DCs when it lists the components.

Ideally I would prefer that we add a ComponentVersion in the Component struct so that I can filter out which components are devfile vs S2I as that is still relavent information that odo list cares about.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 24, 2020
@girishramnani girishramnani added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Oct 24, 2020
@dgolovin
Copy link
Contributor

@kadel this one and #4136 worth to be fixed and released as 2.0.2 IMHO.

@girishramnani girishramnani self-assigned this Oct 29, 2020
dgolovin added a commit to dgolovin/vscode-openshift-tools that referenced this issue Nov 17, 2020
This PR fixes effects of redhat-developer/odo#4144
in Application Explorer View by filtering s2i components without
spec.sourceType.

Signed-off-by: Denis Golovin dgolovin@redhat.com
dgolovin added a commit to redhat-developer/vscode-openshift-tools that referenced this issue Nov 17, 2020
* Workaround for odo issue #4144

This PR fixes effects of redhat-developer/odo#4144
in Application Explorer View by filtering s2i components without
spec.sourceType.

Signed-off-by: Denis Golovin dgolovin@redhat.com
sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 3, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 3, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
@dgolovin
Copy link
Contributor

dgolovin commented Dec 9, 2020

@girishramnani this is still replicable in 2.0.2

@kadel
Copy link
Member

kadel commented Dec 9, 2020

@girishramnani this is still replicable in 2.0.2

Sadly this is not included in 2.0.2.
We had some issues with the release process. It took exceptionally long to push released artifacts :-( 2.0.2 was build from source code before this was merged.
We are currently working on the next release 2.0.3 and that should include this fix.

sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 11, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 11, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 11, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 11, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
@sbouchet
Copy link

verified that issue is fixed in 2.0.3 with redhat-developer/intellij-openshift-connector#251

sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 14, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to sbouchet/intellij-openshift-connector that referenced this issue Dec 14, 2020
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to redhat-developer/intellij-openshift-connector that referenced this issue Jan 5, 2021
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to redhat-developer/intellij-openshift-connector that referenced this issue Jan 5, 2021
redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
sbouchet added a commit to redhat-developer/intellij-openshift-connector that referenced this issue Jan 6, 2021
* updated to odo 2.0.1

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* added assert to verify odo issues

redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* added assert to verify odo issues

redhat-developer/odo#4136 and redhat-developer/odo#4144

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* updated to 2.0.2

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* updated to 2.0.3

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* added tooltip when devfile is detected in context.

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* Deactivate Link for devfile components

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* fix tests

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* Improved error handling

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* cleanup workflow and fix test

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
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. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants