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

Port-forward debug endpoints only when running odo dev with --debug #6254

Closed
rm3l opened this issue Oct 24, 2022 · 0 comments · Fixed by #6505
Closed

Port-forward debug endpoints only when running odo dev with --debug #6254

rm3l opened this issue Oct 24, 2022 · 0 comments · Fixed by #6505
Assignees
Labels
area/dev Issues or PRs related to `odo dev` kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation
Milestone

Comments

@rm3l
Copy link
Member

rm3l commented Oct 24, 2022

/kind feature
/area dev

Which functionality do you think we should add?

I think we should port-forward debug endpoints only when running odo dev --debug.
As discussed in #5988 (comment), we should have a way to identify Debug endpoints.

Why is this needed?

At this time, when running odo dev against a Devfile with a Debug endpoint, all endpoints are port-forwarded, including the debug endpoint.
But when trying (intentionally or not) to reach the corresponding local port, we might get an error because the container may not be listening on the debug port (because we are not running the debug command); as a consequence, port-forwarding is restarted.
Worse, if running odo dev --random-ports, new local random ports get generated.

# Sample project
odo init \
  --devfile-path https://raw.githubusercontent.com/redhat-developer/odo/main/tests/examples/source/devfiles/nodejs/devfile-with-debugrun.yaml \
  --starter nodejs-starter \
  --name nodejs-starter

# Dev Session
odo dev

# Once Dev Session is running, try to access the port-forwarded for the debug endpoint (5858), say: 40002
# This local port will never be reachable unless we stop `odo dev` and run `odo dev --debug` instead.

Related: devfile/registry#122 (comment)

@openshift-ci openshift-ci bot added kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation area/dev Issues or PRs related to `odo dev` labels Oct 24, 2022
@rm3l rm3l added this to odo Project Oct 24, 2022
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Oct 24, 2022
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Jan 3, 2023
@rm3l rm3l self-assigned this Jan 4, 2023
@rm3l rm3l added this to the v3.6.0 🚀 milestone Jan 4, 2023
@rm3l rm3l moved this to In Progress 🚧 in odo Project Jan 17, 2023
@rm3l rm3l moved this from In Progress 🚧 to In Review 👀 in odo Project Jan 19, 2023
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in odo Project Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev Issues or PRs related to `odo dev` kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant