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

Update odo debug --help screen #3963

Merged

Conversation

cdrage
Copy link
Member

@cdrage cdrage commented Sep 15, 2020

What type of PR is this?

/kind cleanup

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

Updates the debug output of odo debug --help to the following:

github.com/openshift/odo  debugging-docs-update ✔                                                                                                                                                                                                                                                                                                                      53m
▶ ./odo debug --help
Debug allows you to remotely debug your application.

Usage:
  odo debug [flags]
  odo debug [command]

Aliases:
  debug, d

Examples:
  # Listen on default port and forwarding to the default port in the pod
  odo debug port-forward

  # Listen on the 5000 port locally, forwarding to default port in the pod
  odo debug port-forward --local-port 5000

  # Get information regarding any debug session of the component
  odo debug info

Available Commands:
  info         Displays debug info of a component
  port-forward Forward one or more local ports to a pod

Flags:
  -h, --help   Help for debug

Additional Flags:
  -v, --v Level              Number for the log level verbosity. Level varies from 0 to 9 (default 0).
      --vmodule moduleSpec   Comma-separated list of pattern=N settings for file-filtered logging

Use "odo debug [command] --help" for more information about a command.

Which issue(s) this PR fixes:

Closes #3871

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

Forward a local port to a remote port on the pod where the application is listening for a debugger.

By default the local port and the remote port will be same. To change the local port you can use --local-port argument and to change the remote port use "odo config set DebugPort <port>"
portforwardLong = templates.LongDesc(`Forward a local port to a remote port on the pod where the application is listening for a debugger. By default the local port and the remote port will be same. To change the local port you can use --local-port argument and to change the remote port use "odo config set DebugPort <port>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For devfile components, config set doesn't work.

[mrinaldas@localhost project]$ odo config set DebugPort 5858
 ✗  unknown parameter :'debugport' is not a configurable parameter in the devfile

It has been changed to env set for devfile components.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Updated.

**What type of PR is this?**

/kind cleanup

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

Updates the debug output of `odo debug --help` to the following:

```sh
github.com/openshift/odo  debugging-docs-update ✔                                                                                                                                                                                                                                                                                                                      53m
▶ ./odo debug --help
Debug allows you to remotely debug your application.

Usage:
  odo debug [flags]
  odo debug [command]

Aliases:
  debug, d

Examples:
  # Listen on default port and forwarding to the default port in the pod
  odo debug port-forward

  # Listen on the 5000 port locally, forwarding to default port in the pod
  odo debug port-forward --local-port 5000

  # Get information regarding any debug session of the component
  odo debug info

Available Commands:
  info         Displays debug info of a component
  port-forward Forward one or more local ports to a pod

Flags:
  -h, --help   Help for debug

Additional Flags:
  -v, --v Level              Number for the log level verbosity. Level varies from 0 to 9 (default 0).
      --vmodule moduleSpec   Comma-separated list of pattern=N settings for file-filtered logging

Use "odo debug [command] --help" for more information about a command.
```

**Which issue(s) this PR fixes**:

Fixes #?

**PR acceptance criteria**:

- [ ] Unit test

- [ ] Integration test

- [ ] Documentation

- [ ] I have read the [test guidelines](https://github.com/openshift/odo/blob/master/docs/dev/test-architecture.adoc)

**How to test changes / Special notes to the reviewer**:
@girishramnani
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: girishramnani

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Sep 16, 2020
@kadel
Copy link
Member

kadel commented Sep 18, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Sep 18, 2020
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

7 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@codecov
Copy link

codecov bot commented Sep 19, 2020

Codecov Report

Merging #3963 into master will decrease coverage by 0.26%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3963      +/-   ##
==========================================
- Coverage   44.82%   44.55%   -0.27%     
==========================================
  Files         143      143              
  Lines       13906    13979      +73     
==========================================
- Hits         6234     6229       -5     
- Misses       7082     7158      +76     
- Partials      590      592       +2     
Impacted Files Coverage Δ
pkg/kclient/deployments.go 21.95% <0.00%> (-11.08%) ⬇️
pkg/odo/cli/service/create.go 10.46% <0.00%> (-2.09%) ⬇️
pkg/odo/cli/service/delete.go 23.33% <0.00%> (-0.40%) ⬇️
pkg/component/component.go 25.47% <0.00%> (-0.33%) ⬇️
pkg/devfile/adapters/common/command.go 95.40% <0.00%> (-0.32%) ⬇️
pkg/devfile/adapters/docker/component/adapter.go 60.28% <0.00%> (-0.19%) ⬇️
pkg/odo/util/cmdutils.go 1.63% <0.00%> (-0.08%) ⬇️
pkg/occlient/occlient.go 49.79% <0.00%> (-0.06%) ⬇️
pkg/odo/cli/service/list.go 0.00% <0.00%> (ø)
pkg/devfile/adapters/common/types.go 50.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fcd367...b554f1a. Read the comment docs.

@openshift-merge-robot openshift-merge-robot merged commit 6a33350 into redhat-developer:master Sep 19, 2020
@cdrage cdrage deleted the debugging-docs-update branch January 14, 2022 14:52
@rm3l rm3l added the area/refactoring Issues or PRs related to code refactoring label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. area/refactoring Issues or PRs related to code refactoring lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add debug examples for "odo debug -h"
8 participants