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

Add context to dependencies endpoint #2434

Conversation

yoave23
Copy link
Contributor

@yoave23 yoave23 commented Aug 30, 2020

Which problem is this PR solving?

Short description of the changes

  • add a context.Context param to the GetDependencies interface and implement accordingly

@yoave23 yoave23 requested a review from a team as a code owner August 30, 2020 11:43
@yoave23 yoave23 force-pushed the Propagate-auth-token-in-dependencies-endpoint branch from 771b6c5 to f322f40 Compare August 30, 2020 11:53
@yoave23 yoave23 changed the title Add context to /dependencies endpoint Add context to dependencies endpoint Aug 30, 2020
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.

Nice change! I left a few minor comments.

@@ -213,7 +213,7 @@ var _escData = map[string]*_escFile{
name: "index.html",
Copy link
Member

Choose a reason for hiding this comment

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

please exclude this file from the PR, it's not related

indices := getIndices(s.indexPrefix, endTs, lookback)
searchResult, err := s.client.Search(indices...).
Size(10000). // the default elasticsearch allowed limit
Query(buildTSQuery(endTs, lookback)).
IgnoreUnavailable(true).
Do(s.ctx)
Do(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Good catch. Can we delete the field s.ctx altogether? I think it was implemented as anti-pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

deleted

@@ -213,7 +213,7 @@ var _escData = map[string]*_escFile{
name: ".nocover",
Copy link
Member

Choose a reason for hiding this comment

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

please exclude this file

@yoave23 yoave23 force-pushed the Propagate-auth-token-in-dependencies-endpoint branch from f322f40 to 86dc478 Compare August 31, 2020 06:19
Signed-off-by: Yoav Eyal <yoave23@gmail.com>
@yoave23 yoave23 force-pushed the Propagate-auth-token-in-dependencies-endpoint branch from 86dc478 to 614701d Compare August 31, 2020 06:29
Signed-off-by: Yoav Eyal <yoave23@gmail.com>
Signed-off-by: yoave23 <yoav.eyal@logz.io>
@codecov
Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #2434 into master will increase coverage by 0.00%.
The diff coverage is 92.30%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2434   +/-   ##
=======================================
  Coverage   95.57%   95.58%           
=======================================
  Files         208      208           
  Lines       10682    10681    -1     
=======================================
  Hits        10209    10209           
+ Misses        400      399    -1     
  Partials       73       73           
Impacted Files Coverage Δ
plugin/storage/integration/integration.go 80.38% <0.00%> (-0.48%) ⬇️
cmd/query/app/grpc_handler.go 97.61% <100.00%> (ø)
cmd/query/app/http_handler.go 100.00% <100.00%> (ø)
cmd/query/app/querysvc/query_service.go 100.00% <100.00%> (ø)
plugin/storage/badger/dependencystore/storage.go 94.73% <100.00%> (ø)
...lugin/storage/cassandra/dependencystore/storage.go 100.00% <100.00%> (ø)
plugin/storage/es/dependencystore/storage.go 90.56% <100.00%> (-0.18%) ⬇️
plugin/storage/grpc/shared/grpc_client.go 85.96% <100.00%> (ø)
plugin/storage/grpc/shared/grpc_server.go 76.47% <100.00%> (ø)
plugin/storage/memory/memory.go 100.00% <100.00%> (ø)
... and 3 more

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 af985ae...1bb2803. Read the comment docs.

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 5fb5e8a into jaegertracing:master Aug 31, 2020
@yoave23 yoave23 deleted the Propagate-auth-token-in-dependencies-endpoint branch September 1, 2020 09:43
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.

Jaeger query doesn't propagate auth token on dependency endpoint
2 participants