-
Notifications
You must be signed in to change notification settings - Fork 235
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
Enable klog in dynamic test #3330
Enable klog in dynamic test #3330
Conversation
Though still need to figure out how to enable the logs in the unified test. |
Thank you for fixing the klog setup in this test! |
go.mod
Outdated
@@ -79,6 +79,7 @@ require ( | |||
k8s.io/apiextensions-apiserver v0.27.9 | |||
k8s.io/apimachinery v0.27.11 | |||
k8s.io/client-go v0.27.11 | |||
k8s.io/klog/examples v0.0.0-20241125110655-fa118f5f4770 |
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.
Interesting. Why do we need to directly import this lib?
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.
Removed.
pkg/test/main/testmain.go
Outdated
@@ -27,6 +28,8 @@ import ( | |||
testenvironment "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/test/environment" | |||
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/test/webhook" | |||
cnrmwebhook "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/webhook" | |||
"k8s.io/klog/examples/util/require" |
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 suggest we do not import the examples lib. It is used for sample purposes but not used as a library. If it changes, Config Connector will break.
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.
Removed.
faeba8a
to
d1abc8a
Compare
d1abc8a
to
de3779c
Compare
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yuwenma 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 |
c3a37f7
into
GoogleCloudPlatform:master
Change description
Followed this guide to enable klog in dynamic test: https://github.com/kubernetes/klog?tab=readme-ov-file#coexisting-with-glog
Now we can see the logs from direct controllers with
-v=2
.Tests you have done
make ready-pr
to ensure this PR is ready for review.