Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ObjectList not deserializing items: null #1199

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Fix ObjectList not deserializing items: null #1199

merged 1 commit into from
Apr 12, 2023

Conversation

suryapandian
Copy link
Contributor

@suryapandian suryapandian commented Apr 12, 2023

Motivation

Metadata watcher gets deserialization error when trying to deserialize null. This PR tries to return default value during such cases.

Solution

if there is a way to extract the func out to be a common place, would be happy to do that.

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #1199 (7b04a84) into main (d294847) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1199      +/-   ##
==========================================
- Coverage   73.51%   73.50%   -0.01%     
==========================================
  Files          68       68              
  Lines        5357     5360       +3     
==========================================
+ Hits         3938     3940       +2     
- Misses       1419     1420       +1     
Impacted Files Coverage Δ
kube-core/src/object.rs 80.95% <100.00%> (+0.95%) ⬆️

... and 1 file with indirect coverage changes

@clux clux added the changelog-fix changelog fix category for prs label Apr 12, 2023
@clux clux added this to the 0.83.0 milestone Apr 12, 2023
@clux clux changed the title when kube api returns with deserialize it to default Fix ObjectList not deserializing items: null Apr 12, 2023
@suryapandian suryapandian marked this pull request as ready for review April 12, 2023 14:52
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!

Context; we saw the items: null cause an error in metadata_watcher for this during the initial list_metadata call when the return set was empty.

@clux clux merged commit 33ba90e into kube-rs:main Apr 12, 2023
@suryapandian suryapandian deleted the nullable_default branch April 12, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-fix changelog fix category for prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants