Skip to content

ReaderFailOnMissingInformer causes the sync check on the cache to be short-circuited #3424

@alvaroaleman

Description

@alvaroaleman

Basically title, if this option is set the cache may not be in sync, resulting in empty LIST results for example.

The problem is that the check if its synced happens in ic.GetInformers but we never call that if this option is set:

if ic.readerFailOnMissingInformer {
cache, started, ok := ic.Informers.Peek(gvk, obj)
if !ok {
return false, nil, &ErrResourceNotCached{GVK: gvk}
}
return started, cache, nil
}

The started boolean we check on only checks if the cache was started, but not if it was actually synced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions