-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: Live Loader Now Supports Slash GraphQL #6117
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
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.
Reviewed 3 of 3 files at r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gja, @manishrjain, @martinmr, and @vvbalaji-dgraph)
dgraph/cmd/live/run.go, line 386 at r3 (raw file):
dialOpts := []grpc.DialOption{} if conf.GetString("slash_grpc_endpoint") != "" && conf.IsSet("auth_token") {
We should also be modifying the description of auth_token so that it says that the token can also be the Slash API key now?
x/tls_helper.go, line 77 at r3 (raw file):
} // SlashTLSConfig returns the TLS config appropriate for SlashGraphQL
Please add a comment that this function assumed endpoint != ""
x/tls_helper.go, line 81 at r3 (raw file):
pool, err := generateCertPool("", true) hostWithoutPort := strings.Split(endpoint, ":")[0] if err != nil {
The error is usually checked right after it is declared. So it should be checked after the poll, err line
Live Loader can now support Slash GraphQL Here is an example: ``` ./dgraph live --slash_grpc_endpoint=defiant-curve-2926.grpc.us-east-1.aws.thegaas.com:443 -f /path/to/file.json.gz -t api-token ``` Why introduce a new flag, `--slash_grpc_endpoint`? * Connections to zero didn't support TLS, so we'd need a new flag to indicate this * There was no way to start TLS, but use the system CA pool (--tls_ca_cert had to be a valid path). This is not needed for public auth * Passing in the --alpha --zero and --tls_server_name with the same value felt clunky * In Slash GraphQL, the GRPC authentication is passed in via `Authentication` metadata to all endpoints, as opposed to only passing in `X-Dgraph-AuthToken` to alter alone
Live Loader can now support Slash GraphQL Here is an example: ``` ./dgraph live --slash_grpc_endpoint=defiant-curve-2926.grpc.us-east-1.aws.thegaas.com:443 -f /path/to/file.json.gz -t api-token ``` Why introduce a new flag, `--slash_grpc_endpoint`? * Connections to zero didn't support TLS, so we'd need a new flag to indicate this * There was no way to start TLS, but use the system CA pool (--tls_ca_cert had to be a valid path). This is not needed for public auth * Passing in the --alpha --zero and --tls_server_name with the same value felt clunky * In Slash GraphQL, the GRPC authentication is passed in via `Authentication` metadata to all endpoints, as opposed to only passing in `X-Dgraph-AuthToken` to alter alone
|
@CodeLingoBot capture errors should be checked immediately after they are declared |
Live Loader can now support Slash GraphQL
Here is an example:
Why introduce a new flag,
--slash_grpc_endpoint?Authenticationmetadata to all endpoints, as opposed to only passing inX-Dgraph-AuthTokento alter aloneThis change is