-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Client: Rename etcdClientDebugLevel function to the ClientLogLevel #20006
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dmvolod The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @dmvolod. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
e824f66
to
7caaaba
Compare
/ok-to-test |
client/v3/logger.go
Outdated
// etcdClientDebugLevel translates ETCD_CLIENT_DEBUG into zap log level. | ||
func etcdClientDebugLevel() zapcore.Level { | ||
// EtcdClientDebugLevel translates ETCD_CLIENT_DEBUG into zap log level. | ||
func EtcdClientDebugLevel() zapcore.Level { |
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.
Maybe we should rename it to make sense for a public function? Fact that we depend on environment variable called "DEBUG" doesn't really make sense. For me this is a function to determine the log level for etcd client.
Maybe something like ClientLogLevel()
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.
Yes, good point, thanks.
Will do.
Signed-off-by: Dmitry Volodin <[email protected]>
7caaaba
to
073dadc
Compare
/cherrypick release-3.5 |
/cherrypick release-3.6 |
@dmvolod: only etcd-io org members may request cherry picks. If you are already part of the org, make sure to change your membership to public. Otherwise you can still do the cherry-pick manually. 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-sigs/prow repository. |
@dmvolod: only etcd-io org members may request cherry picks. If you are already part of the org, make sure to change your membership to public. Otherwise you can still do the cherry-pick manually. 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-sigs/prow repository. |
@serathius please request cherry-pick to the 3.5 and 3.6 versions. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 18 files with indirect coverage changes @@ Coverage Diff @@
## main #20006 +/- ##
==========================================
+ Coverage 68.78% 68.80% +0.01%
==========================================
Files 424 424
Lines 35764 35764
==========================================
+ Hits 24601 24608 +7
+ Misses 9739 9737 -2
+ Partials 1424 1419 -5 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
I would prefer we don't backport a feature, especially to v3.5. Backport for v3.6 would depend on the impact, however if K8s has already copied the function I think they can just wait until we release v3.7. |
Yes, k8s as already copied the function, but very old implementation and now it's not working as expected for ETCD v3.5 and v3.6. Please backport if possible, I will replace it in some K8s when new ETCD version been release. |
@dmvolod: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.
This PR allows to external projects to utilize this function during custom logger creation to align functionality with internal ETCD client logic.
Fox example Kubernetes copy/paste this function about 2 years ago, but now it's not up to date. It's better to import it and have up to date always.
Also Cluster API requires this function too.