-
Notifications
You must be signed in to change notification settings - Fork 669
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
Use jsonpb AllowUnknownFields everywhere #5521
Use jsonpb AllowUnknownFields everywhere #5521
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5521 +/- ##
==========================================
+ Coverage 60.99% 61.05% +0.05%
==========================================
Files 794 794
Lines 51475 51433 -42
==========================================
+ Hits 31397 31402 +5
+ Misses 17186 17146 -40
+ Partials 2892 2885 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Andrew Dye <[email protected]>
a854a08
to
c996dcb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thank you for making the change!
Signed-off-by: Andrew Dye <[email protected]>
Signed-off-by: Andrew Dye <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thank you!
* Use jsonpb AllowUnknownFields everywhere Signed-off-by: Andrew Dye <[email protected]> * Missing return Signed-off-by: Andrew Dye <[email protected]> * make lint-fix Signed-off-by: Andrew Dye <[email protected]> --------- Signed-off-by: Andrew Dye <[email protected]> Signed-off-by: Vladyslav Libov <[email protected]>
Why are the changes needed?
By default
jsonpb.Unmarshal()
,jsonpb.UnmarshalString
, andjsonpb.Unmarshaler{}
setsAllowUnknownFields
tofalse
, which means that unmarshaling a proto message with a newly added field will fail here.What changes were proposed in this pull request?
This change updates all use of
jsonpb.Unmarshal*
to use theflytestlib/utils.Unmarshal*
abstractions, which setAllowUnknownFields
totrue
.There is some risk that this break existing assumptions about new field handling, but since protobuf silently drops fields, it seems reasonable to default to this behavior across the flyte codebase.
How was this patch tested?
Unittests
Setup process
Screenshots
Check all the applicable boxes