-
Notifications
You must be signed in to change notification settings - Fork 243
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
Implement odo logs on podman #6550
Implement odo logs on podman #6550
Conversation
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM feature-wise. Had a minor change to request.
Co-authored-by: Armel Soro <armel@rm3l.org>
@@ -116,11 +117,15 @@ func (o *LogsOptions) Run(ctx context.Context) error { | |||
mode = odolabels.ComponentAnyMode | |||
} | |||
|
|||
ns := "" | |||
if o.clientset.KubernetesClient != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that because the Kubernetes Client is nilable, we might need to check that we are using it in a safe manner.
And indeed, we have a panic when there is no Kubernetes client:
$ KUBECONFIG=/dev/null odo logs --platform cluster
============================================================================
⚠ Experimental mode enabled. Use at your own risk.
More details on https://odo.dev/docs/user-guides/advanced/experimental-mode
============================================================================
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x2a2681d]
goroutine 90 [running]:
github.com/redhat-developer/odo/pkg/logs.(*LogsClient).getPodsForSelector(0xc00047a3f0, {0xc000069290, 0x82}, {0x0, 0x0}, 0xc000138b40?)
/home/asoro/work/projects/odo/pkg/logs/logs.go:123 +0xbd
github.com/redhat-developer/odo/pkg/logs.(*LogsClient).getLogsForMode(0xc00047a3f0, {0x355b748, 0xc000abfda0}, {0xc0001389c0?, 0xc000138a20?, 0xc000138a80?}, {0x0, 0x0}, {0xc000d02258, 0x17}, ...)
/home/asoro/work/projects/odo/pkg/logs/logs.go:97 +0x246
created by github.com/redhat-developer/odo/pkg/logs.(*LogsClient).GetLogsForMode
/home/asoro/work/projects/odo/pkg/logs/logs.go:56 +0x1d2
Not necessarily related to this PR, so I've created a separate issue (#6555) for this, as it also happens on the main
branch.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/override OpenShift-Integration-tests/OpenShift-Integration-tests |
@feloy: Overrode contexts on behalf of feloy: Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests, OpenShift-Integration-tests/OpenShift-Integration-tests In response to this:
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. |
/override ci/prow/v4.11-integration-e2e |
@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e In response to this:
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. |
What type of PR is this:
/kind feature
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #6459
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: