Closed nightkr closed 3 months ago
Attention: Patch coverage is 64.10256%
with 14 lines
in your changes missing coverage. Please review.
Project coverage is 75.4%. Comparing base (
4af4d80
) to head (5a7cefa
). Report is 1 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
kube-core/src/error_boundary.rs | 64.2% | 14 Missing :warning: |
Motivation
Fixes #774. In short, bulk requests (like
Api::list
andwatcher
) are currently unable to cope with failing to parse individual objects, and instead treat the whole list as failed.Solution
This PR introduces a new wrapper type
DeserializeGuard<T>
, which can be used instead ofApi<T>
to opt into a more lenient style, where the list parse succeeds but each object reports errors separately.Since it implements
Resource
, it should also work transparently for APIs building on top ofApi<T>
, such asController<T>
.Ideally, it'd be nice if at least
Controller<T>
would use it transparently, but that would mean a breaking change on theController
types to take the rightApi
variant.