Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Go gRPC, HTTP client and server interoperability tests implemented #3

Merged
merged 6 commits into from
Mar 9, 2018
Merged

Go gRPC, HTTP client and server interoperability tests implemented #3

merged 6 commits into from
Mar 9, 2018

Conversation

odeke-em
Copy link
Contributor

@odeke-em odeke-em commented Mar 6, 2018

No description provided.

@odeke-em odeke-em changed the title Go gRPC server started Go gRPC client and server interop started Mar 6, 2018
HTTP client and server interop test
with the various propagators implemented.

The HTTP request is a POST request with a blank
body. The HTTP response is a JSON serialization
of the protobuf EchoResponse definition
containing the:
* TraceID
* SpanID
* TraceOptions

and the HTTP request's propagation is with:
* B3
* Google
* TraceContext
@odeke-em odeke-em changed the title Go gRPC client and server interop started Go gRPC, HTTP client and server interoperability tests started Mar 7, 2018
All client tests pass, after a consultation from @rakyll and @Ramonza
on how to properly get back the span information to compare.
Thanks to a tip from @rakyll and @Ramonza, can now
check for tags by:
* The server serializing their encoding as bytes
* The client looking up and decoding the tag.Map
from the response bytes

This also warranted a change to the protobuf definitions
hence, hopefully the setup and Go interop test harness
is complete.
@odeke-em odeke-em changed the title Go gRPC, HTTP client and server interoperability tests started Go gRPC, HTTP client and server interoperability tests implemented Mar 7, 2018
@odeke-em
Copy link
Contributor Author

odeke-em commented Mar 7, 2018

/cc @rakyll @Ramonza and thanks y'all for the ideas in today's meeting, they've greatly helped me finish up the Go implementation. I'll hop onto Java next.

if err != nil {
t.Fatalf("Failed to decode tagBlob (% X) err: %v", res.TagsBlob, err)
}
tag.Delete(mustKey("method")).Mutate(inTagMap)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sounds like you found a bug. I don't think we should be sending a method tag - what is the point? would you mind opening an issue on opencensus-go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll file the bug in a second.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Propagation: fh,
}

atRuntimeHandler.ServeHTTP(w, r)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pretty weird - why not just set up separate routes that 1 for each propagation format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was simpler and sufficient to automatically create these :)

@@ -0,0 +1,4 @@
all: gen_proto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a make test to set everything up and run all the tests?

@@ -0,0 +1 @@
## Interop testing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add instructions on running here, which ideally should just be "run make test"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you!

envAddrKey string
fallbackAddr string
}{
{name: "GoClient-GoServer", envAddrKey: "GO_SERVER_ADDR", fallbackAddr: ":9800"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda weird that this is being configured in Go: i would expect the server/client combination to be specified at the top level in a shell script / makefile so other languages wouldn't need to be concerned with editing Go files

@semistrict
Copy link
Contributor

@odeke-em did you get contributor access to this repo yet?

* Added and documented environment variables for running the respective
servers
* Added the test Makefile directive to run all the tests.

Just waiting on the Java clients and servers, include their addresses
and then their tests and we'll be golden.
@odeke-em
Copy link
Contributor Author

odeke-em commented Mar 9, 2018

@Ramonza unfortunately I haven't yet gotten contributor access, but I'll use my own fork in the meantime.

@odeke-em
Copy link
Contributor Author

odeke-em commented Mar 9, 2018

Thank you for the review @Ramonza! I'll merge this in to ensure that the Java team can bootstrap using the Go servers and the proto definitions as well as setup. We can keep iterating on this.

@odeke-em odeke-em merged commit 2e2ad7b into census-ecosystem:master Mar 9, 2018
rghetia pushed a commit that referenced this pull request Dec 12, 2018
Go gRPC, HTTP client and server interoperability tests implemented
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants