-
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
[v2] Fix e2e gRPC remote storage server instability #5459
Conversation
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5459 +/- ##
=======================================
Coverage 95.46% 95.46%
=======================================
Files 331 331
Lines 16112 16112
=======================================
Hits 15382 15382
Misses 556 556
Partials 174 174
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -25,7 +31,7 @@ type RemoteMemoryStorage struct { | |||
} | |||
|
|||
func StartNewRemoteMemoryStorage(t *testing.T) *RemoteMemoryStorage { | |||
logger := zaptest.NewLogger(t) | |||
logger := zaptest.NewLogger(t, zaptest.Level(zap.DebugLevel)) |
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.
debug is the default, don't think we need to specify it
conn, err := grpc.NewClient(fmt.Sprintf("localhost:%d", ports.RemoteStorageGRPC), dialOpts...) | ||
require.NoError(t, err) | ||
require.Eventually(t, func() bool { | ||
s := conn.GetState() |
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 thought the whole point of recent changes in grpc from Dial to NewClient was to avoid proactively creating a connection to the backend(s), so I am not sure if this will ever work.
I think a better solution would be to add "google.golang.org/grpc/health/grpc_health_v1"
to the endpoint and query it (via real request, not via connection status) to verify that the server is up.
## Which problem is this PR solving? - Remote storage server is missing a gRPC health check, the current use case is for testing environment to check if the gRPC server is ready before run the tests. ## Description of the changes - Add "google.golang.org/grpc/health/grpc_health_v1" to remote-storage gRPC server. - Ping health check for remote storage server before proceeding with tests - Add deduping of spans by ID when retrieved from storage (when storage is not idempotent) - Make `testzap` loggers include source file ## How was this change tested? - Tested with #5459 PR. ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: James Ryans <james.ryans2012@gmail.com> Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Yuri Shkuro <github@ysh.us>
I think we can close this. I added pinging of the healthcheck service to #5461 |
Thanks! |
Which problem is this PR solving?
Description of the changes
How was this change tested?
STORAGE=grpc SPAN_STORAGE_TYPE=memory make jaeger-v2-storage-integration-test
jaeger/cmd/remote-storage/app/server.go
Lines 133 to 139 in 14cbcea
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test