You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#280 broke stack unwinding when using a logr.Logger as logging implementation. This was caught when trying out the modified klog before a release with these tests:
Here's an idea how we can prevent such regressions sooner in the future and provide more consistent testing:
split out the formatting code in klog.go into a stand-alone Logger that has its own independent state - already partly done for the testing logger that I worked on a while ago
copy the klog_test.go into a "klog/tests" package and modify them so that other logger implementations can reuse them by overriding the expected output checks
extend the tests to cover various corner cases that Logger's have to support:
KObj handling
panics in functions provided by values (String, Error, MarshalLog)
different value types
duplicate key/value pairs
etc. - unit tests in the various Logger implementations should provide plenty of ideas
The text was updated successfully, but these errors were encountered:
/kind feature
Describe the solution you'd like
#280 broke stack unwinding when using a logr.Logger as logging implementation. This was caught when trying out the modified klog before a release with these tests:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/component-base/logs/json/klog_test.go
Here's an idea how we can prevent such regressions sooner in the future and provide more consistent testing:
The text was updated successfully, but these errors were encountered: