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

Return Unimplemented when services or methods are not implemented #83

Merged
merged 1 commit into from
May 24, 2021

Conversation

kzys
Copy link
Member

@kzys kzys commented May 21, 2021

gRPC has UNIMPLEMENTED status code that indicates a requested method
is not implemented. However ttrpc was returning codes.NotFound which
could be returned when a request entity was not there.

This fix changes the status code from codes.NotFound to
codes.Unimplemented to disambiguate and be more compatible with gRPC.

Signed-off-by: Kazuyoshi Kato [email protected]

@kzys kzys requested a review from estesp May 21, 2021 22:37
@codecov-commenter
Copy link

codecov-commenter commented May 21, 2021

Codecov Report

Merging #83 (fede9db) into master (8ecd516) will increase coverage by 0.81%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
+ Coverage   69.77%   70.58%   +0.81%     
==========================================
  Files          11       11              
  Lines         612      612              
==========================================
+ Hits          427      432       +5     
+ Misses        149      144       -5     
  Partials       36       36              
Impacted Files Coverage Δ
services.go 41.79% <50.00%> (ø)
server.go 74.48% <0.00%> (+0.82%) ⬆️
client.go 80.89% <0.00%> (+1.91%) ⬆️

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 25f5476...fede9db. Read the comment docs.

gRPC has UNIMPLEMENTED status code that indicates a requested method
is not implemented. However ttrpc was returning codes.NotFound which
could be returned when a request entity was not there.

This fix changes the status code from codes.NotFound to
codes.Unimplemented to disambiguate and be more compatible with gRPC.

Fixes containerd#80.

Signed-off-by: Kazuyoshi Kato <[email protected]>
Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 33729c8 into containerd:master May 24, 2021
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.

4 participants