LazyRESTMapper KindsFor does not return all versions when single version is previously queried #2349
Labels
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
Problem
addKnownGroupAndReload
is only triggered when no matches are found. If priming the mapper with a single version and then requesting all versions (not specifying version), a match is found and only a single version returned (not multiple versions).Test Case
The test passes if
lazyRestMapper.KindsFor(schema.GroupVersionResource{Group: "autoscaling", Version: "v1", Resource: "horizontalpodautoscaler"})
is removed, thus making the otherKindsFor
trigger aaddKnownGroupAndReload
.Suggestion
Trigger addKnownGroupAndReload when
schema.GroupVersionResource
input is partial, and some fields are unspecified.The text was updated successfully, but these errors were encountered: