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

deps: fix backwards compatibility with encoding #6965

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

arvindbr8
Copy link
Member

In encoding/proto.go when Marshal() and Unmarshal() we should be able to handle both v1 and v2 of proto messages. But in #6919 we broke backwards compatibility of able to handle v1 proto messages. This change fixes that.

cc: @Clement-Jean

RELEASE NOTES: none

@arvindbr8 arvindbr8 added this to the 1.62 Release milestone Feb 5, 2024
@arvindbr8 arvindbr8 requested a review from dfawley February 5, 2024 22:24
encoding/proto/proto.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Merging #6965 (24902d8) into master (03e76b3) will decrease coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is 57.14%.

❗ Current head 24902d8 differs from pull request most recent head d82c467. Consider uploading reports for the commit d82c467 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6965      +/-   ##
==========================================
- Coverage   83.70%   83.69%   -0.02%     
==========================================
  Files         288      288              
  Lines       30921    30929       +8     
==========================================
+ Hits        25883    25885       +2     
- Misses       3976     3983       +7     
+ Partials     1062     1061       -1     
Files Coverage Δ
encoding/proto/proto.go 66.66% <57.14%> (+4.16%) ⬆️

... and 16 files with indirect coverage changes

@arvindbr8 arvindbr8 merged commit c2b50ee into grpc:master Feb 5, 2024
12 checks passed
@arvindbr8 arvindbr8 deleted the fix_protov1_messages branch February 5, 2024 22:59
var vv proto.Message
vv := messageV2Of(v)
if vv == nil {
return fmt.Errorf("failed to marshal, message is %T, want proto.Message", v)
Copy link
Member

Choose a reason for hiding this comment

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

*unmarshal

Copy link
Member Author

Choose a reason for hiding this comment

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

err... #6966 pls

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants