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

Remove panics in 'to protobuf' logic of the converter #135

Merged
merged 3 commits into from
Jan 1, 2021

Conversation

dc7303
Copy link
Member

@dc7303 dc7303 commented Jan 1, 2021

What this PR does / why we need it:
If an error occurs in the converter, the converter must return an error
and allow the caller to decide how to handle it.

Which issue(s) this PR fixes:

Fixes #50

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

If an error occurs in the converter, the converter must return an error
and allow the caller to decide how to handle it.
@codecov
Copy link

codecov bot commented Jan 1, 2021

Codecov Report

Merging #135 (ec02d1d) into master (d68e7cb) will decrease coverage by 0.28%.
The diff coverage is 73.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   62.25%   61.96%   -0.29%     
==========================================
  Files          26       26              
  Lines        2673     2758      +85     
==========================================
+ Hits         1664     1709      +45     
- Misses        860      882      +22     
- Partials      149      167      +18     
Impacted Files Coverage Δ
yorkie/rpc/server.go 49.59% <37.50%> (-1.28%) ⬇️
api/converter/to_bytes.go 85.15% <57.89%> (-11.00%) ⬇️
api/converter/to_pb.go 82.84% <82.14%> (-4.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d68e7cb...ec02d1d. Read the comment docs.

Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thank you for your work. 👍 I left two types of comments.

  • Whether fmt.Errorf is properly formatted.
  • Apply pbXXX name to protobuf message.

api/converter/to_bytes.go Outdated Show resolved Hide resolved
api/converter/to_pb.go Outdated Show resolved Hide resolved
api/converter/to_bytes.go Outdated Show resolved Hide resolved
api/converter/to_bytes.go Outdated Show resolved Hide resolved
api/converter/to_bytes.go Outdated Show resolved Hide resolved
api/converter/to_pb.go Outdated Show resolved Hide resolved
client/client.go Outdated Show resolved Hide resolved
api/converter/to_pb.go Outdated Show resolved Hide resolved
api/converter/to_bytes.go Outdated Show resolved Hide resolved
api/converter/to_pb.go Outdated Show resolved Hide resolved
@hackerwins hackerwins assigned dc7303 and unassigned hackerwins Jan 1, 2021
@dc7303
Copy link
Member Author

dc7303 commented Jan 1, 2021

@hackerwins
Thank you for the meticulous review! Corrected the issues you suggested :)

@dc7303 dc7303 assigned hackerwins and unassigned dc7303 Jan 1, 2021
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

LGTM. 👍 Thanks for contributing.

@hackerwins hackerwins merged commit aab3f2d into master Jan 1, 2021
@hackerwins hackerwins deleted the remove-panic-in-converter branch January 1, 2021 10:37
jeonjonghyeok pushed a commit to jeonjonghyeok/yorkie that referenced this pull request Aug 4, 2022
If an error occurs in the converter, the converter must return an error
and allow the caller to decide how to handle it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove panic from server code
2 participants