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

Handling of expected error codes coming from grpc storage plugins #1741 #1814

Merged
merged 6 commits into from
Oct 9, 2019

Conversation

chandresh-pancholi
Copy link
Contributor

Signed-off-by: chandresh-pancholi chandreshpancholi007@gmail.com

Which problem is this PR solving?

Short description of the changes

  • Changing the error code

…gertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>
@codecov
Copy link

codecov bot commented Sep 24, 2019

Codecov Report

Merging #1814 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1814      +/-   ##
=========================================
- Coverage   98.42%   98.4%   -0.03%     
=========================================
  Files         197     197              
  Lines        9630    9633       +3     
=========================================
+ Hits         9478    9479       +1     
- Misses        116     117       +1     
- Partials       36      37       +1
Impacted Files Coverage Δ
plugin/storage/memory/memory.go 100% <100%> (ø) ⬆️
plugin/storage/grpc/shared/grpc_client.go 84.15% <100%> (+0.48%) ⬆️
cmd/query/app/static_handler.go 83.33% <0%> (-3.51%) ⬇️
...lugin/sampling/strategystore/adaptive/processor.go 100% <0%> (+0.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b217e1b...4c98e21. Read the comment docs.

@@ -61,7 +61,7 @@ func (c *grpcClient) GetTrace(ctx context.Context, traceID model.TraceID) (*mode
trace := model.Trace{}
for received, err := stream.Recv(); err != io.EOF; received, err = stream.Recv() {
if err != nil {
return nil, errors.Wrap(err, "grpc stream error")
return nil, spanstore.ErrTraceNotFound
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look right, why are you assuming that EVERY error from gRPC is "trace not found"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

}).Return(traceClient, nil)

s, err := r.client.GetTrace(context.Background(), mockTraceID)
assert.Error(t, err)
Copy link
Member

Choose a reason for hiding this comment

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

that doesn't test the issue, you probably want ErrorEquals method

Copy link
Member

Choose a reason for hiding this comment

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

or simply assert.Equals(t, spanstore.ErrTraceNotFound, err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

…gertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Thanks

@yurishkuro yurishkuro merged commit cf286a0 into jaegertracing:master Oct 9, 2019
rubenvp8510 pushed a commit to rubenvp8510/jaeger that referenced this pull request Oct 10, 2019
…#1741 (jaegertracing#1814)

* Handling of expected error codes coming from grpc storage plugins jaegertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>

* Handling of expected error codes coming from grpc storage plugins jaegertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
radekg pushed a commit to Klarrio/jaeger that referenced this pull request Oct 28, 2019
…#1741 (jaegertracing#1814)

* Handling of expected error codes coming from grpc storage plugins jaegertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>

* Handling of expected error codes coming from grpc storage plugins jaegertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>
Signed-off-by: radekg <radek@gruchalski.com>
@yurishkuro yurishkuro added this to the Release 1.15 milestone Nov 7, 2019
backjo pushed a commit to backjo/jaeger that referenced this pull request Dec 19, 2019
…#1741 (jaegertracing#1814)

* Handling of expected error codes coming from grpc storage plugins jaegertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>

* Handling of expected error codes coming from grpc storage plugins jaegertracing#1741

Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>
Signed-off-by: Jonah Back <jonah@jonahback.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants