-
Notifications
You must be signed in to change notification settings - Fork 547
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
rbd: use internal as default error code in getGRPCError() #4671
Conversation
Hi @Rakshith-R, Can you explain why |
Unknown and Internal both will get retries from the callers. We don't use Unknown anywhere else. |
bdbf1a9
to
376b35a
Compare
This commit introduced unknown grpc error code. |
Except that it is easy to forget to add a new error code (we should have unit tests for that), considering a matching gRPC error code is probably better than always returning This change is not bad, but I am not sure how it improves things. In order to prevent the |
376b35a
to
adb0db3
Compare
I think the whole way of creating constants of errors in rbd package, exporting them and using them in csiaddons package should be used only when you need a grpc error code that is not internal. Adopting the export and use method for internal code too would be way too tedious according to me. Most of the places we error out with internal error code. We don't use unknown code at all in other places. |
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.
Error constants that are used only once don't make much sense to me either.
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at ec80175 |
This commit replaces codes.Unknown with codes.Internal as the default error code in getGRPCError(). Signed-off-by: Rakshith R <[email protected]>
adb0db3
to
d0566c3
Compare
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/k8s-e2e-external-storage/1.29 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.29 |
/test ci/centos/k8s-e2e-external-storage/1.30 |
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/mini-e2e/k8s-1.29 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.30 |
/test ci/centos/upgrade-tests-rbd |
/test ci/centos/mini-e2e/k8s-1.30 |
/test ci/centos/k8s-e2e-external-storage/1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
/test ci/centos/mini-e2e/k8s-1.28 |
Describe what this PR does
This commit replaces
codes.Unknown
withcodes.Internal
as the default error code in getGRPCError()since it much better suited.
Checklist:
guidelines in the developer
guide.
Request
notes
updated with breaking and/or notable changes for the next major release.
Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>
: retest the<job-name>
after unrelatedfailure (please report the failure too!)