Skip to content

misc(summaryInformer): include original type in error messages#667

Open
aruiz14 wants to merge 1 commit into
rancher:mainfrom
aruiz14:summary-informer-errors
Open

misc(summaryInformer): include original type in error messages#667
aruiz14 wants to merge 1 commit into
rancher:mainfrom
aruiz14:summary-informer-errors

Conversation

@aruiz14

@aruiz14 aruiz14 commented May 8, 2026

Copy link
Copy Markdown
Contributor

When Kubernetes cache reflectors experience a failure, they will normally log an error message, trying to infer the kind/type that the informer is configured for. Normally, it will fallback to the name of the struct used as example object at the moment of initialization, but it it's possible to configure a specific type description.
When using "FilteredSummaryInformers" (summarizing wrappers around different kinds, steve creates many of them), the example object is always a *summary.SummarizedObject, which makes all error messages look the same, e.g.:

"E0413 22:16:18.708507 56 reflector.go:205] "Failed to watch" err="failed to list *summary.SummarizedObject: the server could not find the requested resource" logger="UnhandledError" reflector="/root/.cache/go/modcache/k8s.io/client-go@v0.34.2/tools/cache/reflector.go:290" type="*summary.SummarizedObject" "

(produced from the DefaultWatchErrorHandler)

This PR just configures the type description to provide visibility on the original kind being watched.

@aruiz14 aruiz14 requested a review from a team as a code owner May 8, 2026 15:19
@aruiz14 aruiz14 requested a review from brandond May 8, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants