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 describe component displays Forwarded Ports for a component that is not running #6534

Closed
rm3l opened this issue Jan 24, 2023 · 5 comments
Labels
area/describe-component Issues or PRs related to `odo describe component` area/dev Issues or PRs related to `odo dev` kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@rm3l
Copy link
Member

rm3l commented Jan 24, 2023

/kind bug

What versions of software are you using?

Operating System:
Fedora 37, kernel 6.1.7-200.fc37.x86_64

Output of odo version:

$ odo version                                                
odo v3.6.0 (95a6b6d81)

Server: https://10.10.10.105:6443
Kubernetes: v1.26.0

How did you run odo exactly?

$ mkdir /tmp/test-go && cd /tmp/test-go
$ odo init --devfile go --name my-go-app --starter go-starter
$ odo dev
# Wait until the Dev Session is started and stop the `odo dev` process abruptly (so it does not have the chance to clean up resources properly), e.g:
$ kill -9 $odo_dev_pid
$ odo describe component
$ odo delete component --wait
# Running "odo describe component" returns a list of forwarded ports, but "Running in" is None
$ odo describe component

Actual behavior

After the component has been deleted, odo describe component reports a list of "Forwarded Ports", but "Running in" is "None":

$ odo describe component     
...

Running in: None

Forwarded ports:
 •  127.0.0.1:20001 -> runtime:8080

...

Expected behavior

odo describe component should not report any forwarded ports, because the component is not running. Same point for its JSON output.
We can:

  • either make odo delete component (and odo delete component --running-in dev) also delete the .odo/devstate.json file if any;
  • and/or change odo describe component such that it shows a list of forwarded ports only if "Running in" contains the Dev mode.

Any logs, error output, etc?

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 24, 2023
@rm3l rm3l added the area/dev Issues or PRs related to `odo dev` label Jan 24, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Jan 24, 2023
@rm3l rm3l added this to odo Project Jan 24, 2023
@github-actions
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 11, 2023
@github-actions
Copy link
Contributor

This issue was closed because it has been inactive for 30 days since being marked as stale.

@github-actions github-actions bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jul 12, 2023
@github-project-automation github-project-automation bot moved this to Done ✅ in odo Project Jul 12, 2023
@rm3l
Copy link
Member Author

rm3l commented Jul 20, 2023

Reopening because of #6994: making odo delete component delete the dev state files would also fix this issue.

@rm3l rm3l reopened this Jul 20, 2023
@github-project-automation github-project-automation bot moved this from Done ✅ to To Do 📝 in odo Project Jul 20, 2023
@rm3l rm3l removed the status in odo Project Jul 20, 2023
@rm3l rm3l removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jul 20, 2023
@github-actions
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 19, 2023
@rm3l
Copy link
Member Author

rm3l commented Oct 19, 2023

This issue is no longer reproduced now that #6994 has been fixed.

odo delete component takes care of deleting the internal devstate.* files. As a consequence, odo describe component will no longer display Forwarded ports for a component that has been deleted.

/close

@rm3l rm3l closed this as completed Oct 19, 2023
@github-project-automation github-project-automation bot moved this to Done ✅ in odo Project Oct 19, 2023
@rm3l rm3l added this to the v3.15.0 🚀 milestone Oct 19, 2023
@rm3l rm3l added area/describe-component Issues or PRs related to `odo describe component` and removed needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/describe-component Issues or PRs related to `odo describe component` area/dev Issues or PRs related to `odo dev` kind/bug Categorizes issue or PR as related to a bug.
Projects
Archived in project
Development

No branches or pull requests

1 participant