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

Implement odo logs on podman #6550

Merged

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Jan 30, 2023

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:

@netlify
Copy link

netlify bot commented Jan 30, 2023

Deploy Preview for odo-docusaurus-preview ready!

Name Link
🔨 Latest commit e635675
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/63d92aa3d2e0cb000acc0c25
😎 Deploy Preview https://deploy-preview-6550--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 the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label Jan 30, 2023
@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

OpenShift Unauthenticated Tests on commit 8658f04 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

NoCluster Tests on commit 8658f04 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

Unit Tests on commit 8658f04 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

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

@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

Validate Tests on commit 8658f04 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

Windows Tests (OCP) on commit 8658f04 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

Kubernetes Tests on commit 8658f04 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 30, 2023

OpenShift Tests on commit 8658f04 finished with errors.
View logs: TXT HTML

@feloy feloy requested review from valaparthvi and removed request for rnapoles-rh January 30, 2023 18:00
@feloy
Copy link
Contributor Author

feloy commented Jan 30, 2023

/retest

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.

LGTM feature-wise. Had a minor change to request.

pkg/podman/logs.go Outdated Show resolved Hide resolved
Co-authored-by: Armel Soro <armel@rm3l.org>
@feloy feloy requested a review from rm3l January 31, 2023 14:50
@@ -116,11 +117,15 @@ func (o *LogsOptions) Run(ctx context.Context) error {
mode = odolabels.ComponentAnyMode
}

ns := ""
if o.clientset.KubernetesClient != nil {
Copy link
Member

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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jan 31, 2023
@feloy feloy closed this Jan 31, 2023
@feloy feloy reopened this Jan 31, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jan 31, 2023

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.0% 0.0% Duplication

@feloy
Copy link
Contributor Author

feloy commented Jan 31, 2023

/override OpenShift-Integration-tests/OpenShift-Integration-tests
Unrelated error
/override Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests

@openshift-ci
Copy link

openshift-ci bot commented Jan 31, 2023

@feloy: Overrode contexts on behalf of feloy: Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests, OpenShift-Integration-tests/OpenShift-Integration-tests

In response to this:

/override OpenShift-Integration-tests/OpenShift-Integration-tests
Unrelated error
/override Kubernetes-Integration-Tests/Kubernetes-Docs-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.

@feloy
Copy link
Contributor Author

feloy commented Jan 31, 2023

/override ci/prow/v4.11-integration-e2e
Infra error

@openshift-ci
Copy link

openshift-ci bot commented Jan 31, 2023

@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e

In response to this:

/override ci/prow/v4.11-integration-e2e
Infra error

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 a94a5fe into redhat-developer:main Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Support odo logs on Podman
3 participants