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

grpc-gateway: watch request returns before events #6055

Closed
gyuho opened this issue Jul 27, 2016 · 2 comments
Closed

grpc-gateway: watch request returns before events #6055

gyuho opened this issue Jul 27, 2016 · 2 comments

Comments

@gyuho
Copy link
Contributor

gyuho commented Jul 27, 2016

It's an upstream issue (grpc-ecosystem/grpc-gateway#195).

Just create here to keep track. This just returns without waiting.

curl -L http://localhost:2379/v3alpha/watch -X POST -d '{"create_request": {"key": "Zm9v"}}'

But can't reproduce with the same code:

package main

import (
    "bytes"
    "fmt"
    "reflect"

    "github.com/coreos/etcd/etcdserver/etcdserverpb"
    "github.com/grpc-ecosystem/grpc-gateway/runtime"
)

func main() {
    var marshaler runtime.Marshaler
    marshaler = &runtime.JSONPb{}
    fmt.Println("reflect", reflect.TypeOf(marshaler))

    bts := []byte(`{"create_request": {"key": "Zm9v"}}`)
    dec := marshaler.NewDecoder(bytes.NewReader(bts))

    var protoReq etcdserverpb.WatchRequest
    err := dec.Decode(&protoReq)

    fmt.Println(protoReq, err)
}
@gyuho
Copy link
Contributor Author

gyuho commented Jul 27, 2016

It's about how we send POST request (cURL, ...). Will close upstream issue as well. Update grpc-gateway dependency to the latest.

@gyuho gyuho closed this as completed Jul 27, 2016
@gyuho
Copy link
Contributor Author

gyuho commented Nov 18, 2016

This is now fixed via #6864.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant