-
Notifications
You must be signed in to change notification settings - Fork 51
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
Update gRPC library in dgraph-js to use gRPC-js #125
Conversation
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.
Minor comments. Add an example for this in the examples
folder and also add a section in README regarding the usage. Later let's see if we can add a test for this.
Reviewed 2 of 17 files at r1, 2 of 3 files at r2, 4 of 10 files at r3, 8 of 12 files at r4, 2 of 2 files at r5, 2 of 2 files at r6, 8 of 8 files at r7.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @anurags92 and @gja)
package.json, line 53 at r7 (raw file):
"dependencies": { "@grpc/grpc-js": "^1.1.7", "@types/url-parse": "^1.4.3",
"@types/url-parse" can go in devDependencies
examples/tls/index.js, line 12 at r7 (raw file):
// $ dgraph cert -n localhost // $ dgraph cert -c user console.log(path.join(__dirname, "tls", "ca.crt"));
log statement can be removed
src/clientStubFromSlash.ts, line 5 at r7 (raw file):
import { DgraphClientStub } from "./clientStub"; const PORT = "443";
can be lowercase
Currently, the `grpc` dependency is causing the issue shown in issue #231 due to an incompatibility with the most recent version of `grpc` and any platform other than Linux based on our testing. We've also shown reports that the prebuilt binaries downloaded by `gprc` are causing massive bloat _**(nearly a 5x increase in size)**_ to our bundles that are generated with the dependency included. Upon investigation, we noticed that `grpc` isn't actually used by anything in the library anymore, and was seemingly [added back by mistake](#183) during the most recent release, as `@grpc/grpc-js` is used in place of it. Sources: [Original PR](#125) to remove `grpc` [PR I made last year](#164), where `grpc` was not in the list of dependencies at the time, reinforcing the fact that it was added back by mistake [The README of this very repo](https://github.com/dgraph-io/dgraph-js?tab=readme-ov-file#install), which has instructions to install `@grpc/grpc-js` and not `grpc`, and [here is the PR](#182) where that change was made This PR is to remove the `grpc` dependency from the package to accomplish the following: - remedy the installation issue - reduce install sizes - get rid of an unused dependency
grpc
npm module togrpc-js
in lieu of the deprecation of the former.This change is