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 gRPC Dependency in the Codebase #940

Open
krapie opened this issue Jul 23, 2024 · 0 comments
Open

Remove gRPC Dependency in the Codebase #940

krapie opened this issue Jul 23, 2024 · 0 comments
Labels
enhancement 🌟 New feature or request

Comments

@krapie
Copy link
Member

krapie commented Jul 23, 2024

Description:

We recently introduced ConnectRPC as a replacement for gRPC in our codebase. However, remnants of the gRPC library still exist in our code. For example, we are currently utilizing the gRPC error detail library to verify error details.

To streamline our codebase and reduce unnecessary dependencies, we should consider removing all remnants of the gRPC library. This could involve creating our custom error detail type or referencing ConnectRPC error types to replace the gRPC error detail library.

if err != nil {
// TODO(chacha912): consider creating the error details type to remove the dependency on gRPC.
st := status.Convert(err)
for _, detail := range st.Details() {
switch t := detail.(type) {
case *errdetails.BadRequest:
for _, violation := range t.GetFieldViolations() {
cmd.Printf("Invalid Fields: The %q field was wrong: %s\n", violation.GetField(), violation.GetDescription())
}
}
}
return err
}

Why:

Removing the gRPC dependency will not only simplify the codebase but also make the project lighter and more efficient.

@krapie krapie added the enhancement 🌟 New feature or request label Jul 23, 2024
@krapie krapie moved this to Backlog in Yorkie Project - 2024 Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant