-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Separate Ports for GRPC and HTTP requests in Query Server #2387
Conversation
Signed-off-by: rjs211 <[email protected]>
Signed-off-by: rjs211 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2387 +/- ##
==========================================
- Coverage 95.57% 95.54% -0.04%
==========================================
Files 208 208
Lines 10690 10741 +51
==========================================
+ Hits 10217 10262 +45
- Misses 401 404 +3
- Partials 72 75 +3
Continue to review full report at Codecov.
|
Is there any convention for defining new ports and port Numbers? (Need to add a default port of gRPC requests) |
For ports that are highly related, just use the next integer for the new port, if it's free. Like: |
I am going with |
@rjs211 @jpkrohling Wouldn't this be a breaking change then? Shouldn't the default value for both of the new flags be |
The actual assignment is as follows:
for now, default values of This will be more significant when the usage of TLS is enabled for either or both of grpc and http (once http TLS is supported by #2337 ) and the use of two separate ports will be forced on the user (as explained by issue #2377 ). |
@rjs211 Understand the reasons for having separate ports when TLS is being configured, but from the sounds of (1):
the default behaviour (i.e. where no flags are defined) will be that grpc and http query ports are different. Therefore this is a breaking change? |
the case of |
Looks like we are all on the same page, but just to be clear: we should not have breaking changes. |
Signed-off-by: rjs211 <[email protected]>
Signed-off-by: rjs211 <[email protected]>
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.
I'll do a couple of manual tests, and there are a couple of minor things to change, but in general, LGTM.
For the manual test, I build a simple Go application that lists the services from a target Query server, and I can confirm that the gRPC changes from this PR works: package main
import (
"context"
"flag"
"fmt"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
_ "github.com/jaegertracing/jaeger/proto-gen/api_v2"
"go.uber.org/zap"
"google.golang.org/grpc"
)
func main() {
logger, err := zap.NewDevelopment()
if err != nil {
fmt.Println(err)
return
}
hostPort := flag.String("host-port", "localhost:16686", "the host-port to use when connecting to the remote Jaeger Query server")
flag.Parse()
fmt.Printf("Using host-port: %s\n", *hostPort)
conn, err := grpc.Dial(*hostPort, grpc.WithInsecure())
if err != nil {
logger.Error("failed to connect to the collector", zap.Error(err))
}
defer conn.Close()
client := api_v2.NewQueryServiceClient(conn)
req := api_v2.GetServicesRequest{}
resp, err := client.GetServices(context.Background(), &req)
if err != nil {
logger.Error("failed to get list of services", zap.Error(err))
return
}
if len(resp.Services) == 0 {
fmt.Println("No services at the target server.")
return
}
fmt.Println("Available services at the target server:")
for _, svc := range resp.Services {
fmt.Printf("- %s\n", svc)
}
} |
Signed-off-by: rjs211 <[email protected]> 1. Added test cases for `HostPortToPort` method 2. Modified Depricated warning to reasonable date
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.
LGTM.
Anyone else wants to re-review? @yurishkuro ? |
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.
Looks pretty good to me! Mostly minor comments.
Signed-off-by: rjs211 <[email protected]>
@rjs211 please increase the patch code coverage. |
Signed-off-by: rjs211 <[email protected]>
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.
Thanks @rjs211! LGTM
Wonderful work, @rjs211! Thank you for your contribution! |
@jpkrohling @albertteoh @objectiser @yurishkuro Thank you very much for your guidance and patience. This is my first code contribution to opensource. Hope to contribute further. |
This PR introduced warning message in OTEL all-in-one:
|
I logged the warning intentionally as per my understanding of #2377 (comment) . Should have I not done that? |
I have submitted a PR to fix it #2479 |
Which problem is this PR solving?
Short description of the changes