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

Documentation: Debugging with OpenShift Toolkit #6691

Merged

Conversation

valaparthvi
Copy link
Contributor

@valaparthvi valaparthvi commented Mar 28, 2023

What type of PR is this:
/kind feature
/area documentation

What does this PR do / why we need it:
This PR adds tutorial for debugging with OpenShift Toolkit.

Which issue(s) this PR fixes:

Fixes #6663

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:
https://deploy-preview-6691--odo-docusaurus-preview.netlify.app/docs/user-guides/advanced/debugging-with-openshift-toolkit

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Mar 28, 2023
@netlify
Copy link

netlify bot commented Mar 28, 2023

Deploy Preview for odo-docusaurus-preview ready!

Name Link
🔨 Latest commit 2ef051a
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/64259b8ec999a8000936868d
😎 Deploy Preview https://deploy-preview-6691--odo-docusaurus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@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/documentation Issues or PRs related to documentation or the 'odo.dev' website labels Mar 28, 2023
@openshift-ci openshift-ci bot requested review from feloy and kadel March 28, 2023 06:28
@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

OpenShift Unauthenticated Tests on commit 666435d finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

NoCluster Tests on commit 666435d finished with errors.
View logs: TXT HTML

@valaparthvi
Copy link
Contributor Author

@rm3l I have created a draft. Looking at the current content, I am wondering if we need separate tutorials for all the frameworks. Also, I think the point of this doc is to simply help user get started with debugging, so this doc leaves the user at a point after which they can do their own debugging.

But, I am looking forward to your opinion on this, I have a feeling this is different from how you might have written/approached this doc.

@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

Unit Tests on commit 666435d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

Validate Tests on commit 666435d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

Kubernetes Tests on commit 666435d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

Windows Tests (OCP) on commit 666435d finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

OpenShift Tests on commit 666435d finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 28, 2023

Kubernetes Docs Tests on commit cb5d20d finished with errors.
View logs: TXT HTML

@rm3l
Copy link
Member

rm3l commented Mar 28, 2023

@rm3l I have created a draft. Looking at the current content, I am wondering if we need separate tutorials for all the frameworks. Also, I think the point of this doc is to simply help user get started with debugging, so this doc leaves the user at a point after which they can do their own debugging.

But, I am looking forward to your opinion on this, I have a feeling this is different from how you might have written/approached this doc.

I was initially thinking of having different advanced tutorials showing how we could use each language-specific debugger (like jdb, dlv, ...) to attach to the local port opened by odo dev --debug and forwarded to the containerized app.
This would show how odo works together with other debugging tools for the languages we support.

But I agree with having a single tutorial helping users get started with debugging in their IDEs, as that's what most people would usually do.

@valaparthvi valaparthvi changed the title [WIP]Documentation: Debugging with OpenShift Toolkit Documentation: Debugging with OpenShift Toolkit Mar 28, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Mar 28, 2023
@valaparthvi valaparthvi requested a review from rm3l March 30, 2023 14:24
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.3% 0.3% Duplication

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

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

Thanks for documenting this.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Mar 30, 2023
@rm3l
Copy link
Member

rm3l commented Mar 31, 2023

  [odo]   __
  [odo]  /  \__     Initializing a new component
  [odo]  \__/  \    
  [odo]  /  \__/    odo version: v3.8.0
  [odo]  \__/
  [odo] 
  [odo]  •  Downloading devfile "go:2.0.0"  ...
  [odo] I0330 15:53:43.581376   11850 registry.go:53] sending telemetry data: library.TelemetryData{User:"", Locale:"", Client:"odo"}
  [odo] 
 ✓  Downloading devfile "go:2.0.0" [996ms]
  [odo] I0330 15:53:44.577504   11850 context.go:159] absolute devfile path: '/tmp/628033663/devfile.yaml'
  [odo] I0330 15:53:44.577555   11850 context.go:110] absolute devfile path: '/tmp/628033663/devfile.yaml'
  [odo] I0330 15:53:44.579499   11850 content.go:48] converted devfile YAML to JSON
  [odo] I0330 15:53:44.579786   11850 apiVersion.go:60] devfile schemaVersion: '2.2.0'
  [odo] I0330 15:53:44.579855   11850 helper.go:56] devfile apiVersion '2.2.0' is supported
  [odo] I0330 15:53:44.587490   11850 schema.go:61] validated devfile schema
  [odo]  ✗  unable to parse devfile: failed to convert kubernetes uri to inlined for component 'deploy': failed to read kubernetes resources definition from path '/tmp/628033663/kubernetes/deploy.yaml': open /tmp/628033663/kubernetes/deploy.yaml: no such file or directory
  [odo] the command failed, the devfile has been removed from current directory
  [FAILED] in [It] - /go/odo_1/tests/helper/helper_cmd_wrapper.go:101 @ 03/30/23 15:53:44.604
  Setting current dir to: /go/odo_1/tests/documentation/command-reference
  Deleting dir: /tmp/628033663
  Deleting dir: /tmp/912840575
  << Timeline

  [FAILED] No future change is possible.  Bailing out early after 1.152s.
  Running odo with args [odo init --devfile go --name my-go-app --devfile-version 2.0.0] and odo env: []
  Expected
      <int>: 1
  to match exit code:
      <int>: 0
  In [It] at: /go/odo_1/tests/helper/helper_cmd_wrapper.go:101 @ 03/30/23 15:53:44.604
------------------------------

All tests seem to be failing because of an issue with the Staging Devfile registry => issue discussed in this Slack thread.

/override Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests
/override NoCluster-Integration-tests/NoCluster-Integration-tests
/override OpenShift-Integration-tests/OpenShift-Unauth-Integration-tests
/override windows-integration-test/Windows-test

Overriding them all for this PR because it only changes the website.

@openshift-ci
Copy link

openshift-ci bot commented Mar 31, 2023

@rm3l: Overrode contexts on behalf of rm3l: Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests, NoCluster-Integration-tests/NoCluster-Integration-tests, OpenShift-Integration-tests/OpenShift-Unauth-Integration-tests, windows-integration-test/Windows-test

In response to this:

 [odo]   __
 [odo]  /  \__     Initializing a new component
 [odo]  \__/  \    
 [odo]  /  \__/    odo version: v3.8.0
 [odo]  \__/
 [odo] 
 [odo]  •  Downloading devfile "go:2.0.0"  ...
 [odo] I0330 15:53:43.581376   11850 registry.go:53] sending telemetry data: library.TelemetryData{User:"", Locale:"", Client:"odo"}
 [odo] 
✓  Downloading devfile "go:2.0.0" [996ms]
 [odo] I0330 15:53:44.577504   11850 context.go:159] absolute devfile path: '/tmp/628033663/devfile.yaml'
 [odo] I0330 15:53:44.577555   11850 context.go:110] absolute devfile path: '/tmp/628033663/devfile.yaml'
 [odo] I0330 15:53:44.579499   11850 content.go:48] converted devfile YAML to JSON
 [odo] I0330 15:53:44.579786   11850 apiVersion.go:60] devfile schemaVersion: '2.2.0'
 [odo] I0330 15:53:44.579855   11850 helper.go:56] devfile apiVersion '2.2.0' is supported
 [odo] I0330 15:53:44.587490   11850 schema.go:61] validated devfile schema
 [odo]  ✗  unable to parse devfile: failed to convert kubernetes uri to inlined for component 'deploy': failed to read kubernetes resources definition from path '/tmp/628033663/kubernetes/deploy.yaml': open /tmp/628033663/kubernetes/deploy.yaml: no such file or directory
 [odo] the command failed, the devfile has been removed from current directory
 [FAILED] in [It] - /go/odo_1/tests/helper/helper_cmd_wrapper.go:101 @ 03/30/23 15:53:44.604
 Setting current dir to: /go/odo_1/tests/documentation/command-reference
 Deleting dir: /tmp/628033663
 Deleting dir: /tmp/912840575
 << Timeline

 [FAILED] No future change is possible.  Bailing out early after 1.152s.
 Running odo with args [odo init --devfile go --name my-go-app --devfile-version 2.0.0] and odo env: []
 Expected
     <int>: 1
 to match exit code:
     <int>: 0
 In [It] at: /go/odo_1/tests/helper/helper_cmd_wrapper.go:101 @ 03/30/23 15:53:44.604
------------------------------

All tests seem to be failing because of an issue with the Staging Devfile registry => issue discussed in this Slack thread.

/override Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests
/override NoCluster-Integration-tests/NoCluster-Integration-tests
/override OpenShift-Integration-tests/OpenShift-Unauth-Integration-tests
/override windows-integration-test/Windows-test

Overriding them all for this PR because it only changes the website.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rm3l
Copy link
Member

rm3l commented Mar 31, 2023

  [FAILED] Expected
      <string>: main: Thu Mar 30 14:56:02 UTC 2023 - this is infinite while loop
      main[1]: 
      main[1]: > [email protected] start /opt/app-root/src
      main[1]: > node server.js
      main[1]: 
      main[1]: App started on PORT 3000
      main[1]: {"level":30,"time":1680188159308,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":1,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3307},"message":"Hello from Node.js Starter Application!"}
      main[1]: {"level":30,"time":1680188159326,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":1,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3307},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","content-type":"text/html; charset=utf-8","content-length":"38","etag":"W/\"26-tWfopc/J/wrx1F/+R+Noh9LRPaM\""}},"responseTime":19,"msg":"request completed"}
      main[1]: {"level":30,"time":1680188165247,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":2,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3311},"message":"Hello from Node.js Starter Application!"}
      main[1]: {"level":30,"time":1680188165248,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":2,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3311},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","content-type":"text/html; charset=utf-8","content-length":"38","etag":"W/\"26-tWfopc/J/wrx1F/+R+Noh9LRPaM\""}},"responseTime":1,"msg":"request completed"}
      
  to contain substring
      <string>: main[2]:
...

Summarizing 1 Failure:
  [FAIL] odo logs command tests when component is created and odo logs is executed when running in Deploy mode [It] should successfully show logs of the running component
  /go/odo_1/tests/helper/helper_generic.go:79

Ran 429 of 779 Specs in 1198.963 seconds
FAIL! -- 428 Passed | 1 Failed | 0 Pending | 350 Skipped

Flaky test (#6619)

/override OpenShift-Integration-tests/OpenShift-Integration-tests

@openshift-ci
Copy link

openshift-ci bot commented Mar 31, 2023

@rm3l: Overrode contexts on behalf of rm3l: OpenShift-Integration-tests/OpenShift-Integration-tests

In response to this:

 [FAILED] Expected
     <string>: main: Thu Mar 30 14:56:02 UTC 2023 - this is infinite while loop
     main[1]: 
     main[1]: > [email protected] start /opt/app-root/src
     main[1]: > node server.js
     main[1]: 
     main[1]: App started on PORT 3000
     main[1]: {"level":30,"time":1680188159308,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":1,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3307},"message":"Hello from Node.js Starter Application!"}
     main[1]: {"level":30,"time":1680188159326,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":1,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3307},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","content-type":"text/html; charset=utf-8","content-length":"38","etag":"W/\"26-tWfopc/J/wrx1F/+R+Noh9LRPaM\""}},"responseTime":19,"msg":"request completed"}
     main[1]: {"level":30,"time":1680188165247,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":2,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3311},"message":"Hello from Node.js Starter Application!"}
     main[1]: {"level":30,"time":1680188165248,"pid":17,"hostname":"devfile-nodejs-deploy-2-7cf6d678b5-shmj5","req":{"id":2,"method":"GET","url":"/","query":{},"params":{},"headers":{"host":"172.17.62.18:3000","user-agent":"kube-probe/1.22","accept":"*/*","connection":"close"},"remoteAddress":"::ffff:10.243.64.99","remotePort":3311},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","content-type":"text/html; charset=utf-8","content-length":"38","etag":"W/\"26-tWfopc/J/wrx1F/+R+Noh9LRPaM\""}},"responseTime":1,"msg":"request completed"}
     
 to contain substring
     <string>: main[2]:
...

Summarizing 1 Failure:
 [FAIL] odo logs command tests when component is created and odo logs is executed when running in Deploy mode [It] should successfully show logs of the running component
 /go/odo_1/tests/helper/helper_generic.go:79

Ran 429 of 779 Specs in 1198.963 seconds
FAIL! -- 428 Passed | 1 Failed | 0 Pending | 350 Skipped

Flaky test (#6619)

/override OpenShift-Integration-tests/OpenShift-Integration-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit 08c3904 into redhat-developer:main Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation or the 'odo.dev' website kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation 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.

Documentation(Advanced Usage): Tutorial to debug an application (Go, Python, Dotnet, Java)
3 participants