mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#407)
Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
f2a2f63f12
commit
c3efd692dc
2
go.mod
2
go.mod
|
@ -18,5 +18,5 @@ require (
|
|||
k8s.io/code-generator v0.18.12
|
||||
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
|
||||
knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24
|
||||
knative.dev/pkg v0.0.0-20201215202458-ef8048c0ba77
|
||||
knative.dev/pkg v0.0.0-20201216162758-261c9b4624df
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1172,8 +1172,8 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7Mpm
|
|||
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24 h1:kIztWfvnIFV8Lhlea02K3YO2mIzcDyQNzrBLn0Oq9sA=
|
||||
knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/pkg v0.0.0-20201215202458-ef8048c0ba77 h1:N9DkFX8F4h86MGXgbvr5Sz9ojj6qMOm2IyIZRqXbC+g=
|
||||
knative.dev/pkg v0.0.0-20201215202458-ef8048c0ba77/go.mod h1:VjrwVhfEZUnn6FruncHcBm854FldnRpekpyBbYtBvZM=
|
||||
knative.dev/pkg v0.0.0-20201216162758-261c9b4624df h1:rVbKwiRXpBKEiOET0xBwNDCe0q1gYYTTHXxOpYX6+GQ=
|
||||
knative.dev/pkg v0.0.0-20201216162758-261c9b4624df/go.mod h1:VjrwVhfEZUnn6FruncHcBm854FldnRpekpyBbYtBvZM=
|
||||
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
|
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/google/uuid"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
@ -265,9 +266,12 @@ func (c *Impl) EnqueueAfter(obj interface{}, after time.Duration) {
|
|||
// and enqueues that key in the slow lane.
|
||||
func (c *Impl) EnqueueSlowKey(key types.NamespacedName) {
|
||||
c.workQueue.SlowLane().Add(key)
|
||||
c.logger.With(zap.String(logkey.Key, key.String())).
|
||||
Debugf("Adding to the slow queue %s (depth(total/slow): %d/%d)",
|
||||
safeKey(key), c.workQueue.Len(), c.workQueue.SlowLane().Len())
|
||||
|
||||
if logger := c.logger.Desugar(); logger.Core().Enabled(zapcore.DebugLevel) {
|
||||
logger.Debug(fmt.Sprintf("Adding to the slow queue %s (depth(total/slow): %d/%d)",
|
||||
safeKey(key), c.workQueue.Len(), c.workQueue.SlowLane().Len()),
|
||||
zap.String(logkey.Key, key.String()))
|
||||
}
|
||||
}
|
||||
|
||||
// EnqueueSlow extracts namespaced name from the object and enqueues it on the slow
|
||||
|
@ -393,8 +397,11 @@ func (c *Impl) EnqueueNamespaceOf(obj interface{}) {
|
|||
// EnqueueKey takes a namespace/name string and puts it onto the work queue.
|
||||
func (c *Impl) EnqueueKey(key types.NamespacedName) {
|
||||
c.workQueue.Add(key)
|
||||
c.logger.With(zap.String(logkey.Key, key.String())).
|
||||
Debugf("Adding to queue %s (depth: %d)", safeKey(key), c.workQueue.Len())
|
||||
|
||||
if logger := c.logger.Desugar(); logger.Core().Enabled(zapcore.DebugLevel) {
|
||||
logger.Debug(fmt.Sprintf("Adding to queue %s (depth: %d)", safeKey(key), c.workQueue.Len()),
|
||||
zap.String(logkey.Key, key.String()))
|
||||
}
|
||||
}
|
||||
|
||||
// MaybeEnqueueBucketKey takes a Bucket and namespace/name string and puts it onto
|
||||
|
@ -409,8 +416,11 @@ func (c *Impl) MaybeEnqueueBucketKey(bkt reconciler.Bucket, key types.Namespaced
|
|||
// the work queue after given delay.
|
||||
func (c *Impl) EnqueueKeyAfter(key types.NamespacedName, delay time.Duration) {
|
||||
c.workQueue.AddAfter(key, delay)
|
||||
c.logger.With(zap.String(logkey.Key, key.String())).
|
||||
Debugf("Adding to queue %s (delay: %v, depth: %d)", safeKey(key), delay, c.workQueue.Len())
|
||||
|
||||
if logger := c.logger.Desugar(); logger.Core().Enabled(zapcore.DebugLevel) {
|
||||
logger.Debug(fmt.Sprintf("Adding to queue %s (delay: %v, depth: %d)", safeKey(key), delay, c.workQueue.Len()),
|
||||
zap.String(logkey.Key, key.String()))
|
||||
}
|
||||
}
|
||||
|
||||
// RunContext starts the controller's worker threads, the number of which is threadiness.
|
||||
|
|
|
@ -195,8 +195,8 @@ func UpdateLevelFromConfigMap(logger *zap.SugaredLogger, atomicLevel zap.AtomicL
|
|||
case errors.Is(err, errEmptyLoggerConfig):
|
||||
level = zap.NewAtomicLevel().Level()
|
||||
case err != nil:
|
||||
logger.With(zap.Error(err)).Errorf("Failed to parse logger configuration. "+
|
||||
"Previous log level retained for %v", levelKey)
|
||||
logger.Errorw("Failed to parse logger configuration. Previous log level retained for "+levelKey,
|
||||
zap.Error(err))
|
||||
return
|
||||
default:
|
||||
level = loggingCfg.Level.Level()
|
||||
|
|
|
@ -748,7 +748,7 @@ k8s.io/utils/trace
|
|||
# knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24
|
||||
## explicit
|
||||
knative.dev/hack
|
||||
# knative.dev/pkg v0.0.0-20201215202458-ef8048c0ba77
|
||||
# knative.dev/pkg v0.0.0-20201216162758-261c9b4624df
|
||||
## explicit
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
Loading…
Reference in New Issue