kubernetes / client-go

Go client for Kubernetes.
Apache License 2.0
8.79k stars 2.91k forks source link

Allow operating on errors instead of logging them #1247

Open rexagod opened 1 year ago

rexagod commented 1 year ago

At the moment, there is no option to avoid logging certain errors, which also prevents dependent repositories from operating on these errors in a way that would make more sense to the user-facing side of things. IIUC, it makes sense to use HandleError for all non-user-facing facets, but not so much in cases where this ends up adding to the confusion of the user since the caller had no way to deal with these errors.


A bit of context; at the moment, I'm using reflectors to update stores which are dynamic in nature, in the sense that these can be operated on to add or drop certain resources. This however, leads to reflector.go logging whenever a previously-found resource goes "missing". Is there a possible workaround to this, or maybe something that I'm completely failing to see?

k8s-triage-robot commented 5 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 4 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

mrueg commented 4 months ago

/remove-lifecycle rotten

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

rexagod commented 1 month ago

/remove-lifecycle stale