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

Revert "kube-derive: Disable option_nullable for CRD generation" #1201

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

Dav1dde
Copy link
Member

@Dav1dde Dav1dde commented Apr 13, 2023

Reverts #1079

The problem is, that after this change serde behaviour of serializing Option::None as null is not compatible with the generated CRD anymore and requires fields to be annotated with skip_serializing_if = "Option::is_none".

While this is not necessarily incorrect it is also a giant footgun for default behaviour.

@clux clux added the changelog-fix changelog fix category for prs label Apr 13, 2023
@clux clux added this to the 0.83.0 milestone Apr 13, 2023
@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #1201 (25789d6) into main (33ba90e) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1201      +/-   ##
==========================================
- Coverage   73.52%   73.49%   -0.04%     
==========================================
  Files          68       68              
  Lines        5360     5350      -10     
==========================================
- Hits         3941     3932       -9     
+ Misses       1419     1418       -1     
Impacted Files Coverage Δ
kube-derive/src/custom_resource.rs 13.83% <ø> (ø)
kube-derive/tests/crd_schema_test.rs 100.00% <100.00%> (+2.50%) ⬆️

)"

This reverts commit 2968e3e.

Signed-off-by: David Herberth <github@dav1d.de>
@Dav1dde Dav1dde force-pushed the revert-1079-option_nullable branch from 5a27bf3 to 25789d6 Compare April 14, 2023 07:25
@clux clux merged commit 6f834a1 into main Apr 14, 2023
@clux clux deleted the revert-1079-option_nullable branch April 14, 2023 07:45
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