-
Notifications
You must be signed in to change notification settings - Fork 113
Don't throw away errors from ShouldPropagate #82
Comments
/good-first-issue |
@adrianludwin: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed 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/test-infra repository. |
/assign |
Hi @adrianludwin 👋🏼 I prefer the latter one but as I am new, I might be missing something so I'd love to hear your suggestion :) |
Ok I had a look and I can see why we're not propagating these up. The scenario where you could get an error is:
In this case, we should not propagate the error back upwards, as it would effectively block everyone else, without giving them any way to resolve the issue. This seems suboptimal. Instead, I'd vote for logging the error, e.g. something like this:
That way, if the admin is monitoring errors, they'll get a flood of them whenever we might be making the wrong choice - which is exactly what we want. The The one downside here is that it looks like the name of the object that has the bad selector isn't going to be identified. We could add it individually to each of the places where we log the error, but IMO it's better to add this information to the error itself when they're first generated, i.e. in GetSelector, GetTreeSelector and GetNoneSelector. Each of these functions (which are the only ones that can cause an error in To take the simplest example of
with something like this:
Which will give a string like I wouldn't worry about testing this too much, since we're just talking about improving an error message and logging messages that got away. If you like, you could create a bad selector on an object by disabling all the webhooks, making a bad change, and then re-enabling the webhooks and checking the logs, but it's not strictly necessary. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. 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/test-infra repository. |
See comment. We're discarding errors but we shouldn't be; they should be
propagated upwards like any other error or at leastlogged as an error (Update Sep 25 - we should log them, see discussion below)./cc @joe2far
The text was updated successfully, but these errors were encountered: