klog: hide reflector.go warnings#1820
Merged
Merged
Conversation
nicks
approved these changes
Jul 8, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
informers annoyingly log spurious warnings, e.g.:
github.com/windmilleng/tilt/internal/k8s/watch.go:105: watch of *v1.Event ended with: The resourceVersion for the provided watch is too old.I've seen these warnings pop up a number of times, and there's not really anything useful for a user to do in response to them.
If you google "resourceVersion for the provided watch is too old", you get a bunch of people asking what these mean and wondering why it's all over their logs, and all the answers I've seen have been "oh that doesn't matter, just ignore it".
When I've observed this warning in Tilt, I've seen no indication it's actually caused a problem, and I've still seen events.
This is a warning that happens at the watch level, but we're using the informer api on top of it, which handles it.
Solution
Suppress warnings from reflector.go.
This runs the risk of hiding other reflector.go warnings that are actually useful, but there are not currently any such warnings.