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

[V3/API] Add time window for GetTrace http_gateway #6248

Closed

Conversation

rim99
Copy link
Contributor

@rim99 rim99 commented Nov 24, 2024

Which problem is this PR solving?

Description of the changes

How was this change tested?

  • unit test

Checklist

@rim99 rim99 force-pushed the http-api-time-window-trace-get branch from d31c84e to bd100ec Compare December 16, 2024 12:27
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.12%. Comparing base (ef799d1) to head (bd100ec).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6248   +/-   ##
=======================================
  Coverage   96.11%   96.12%           
=======================================
  Files         360      360           
  Lines       20485    20500   +15     
=======================================
+ Hits        19690    19705   +15     
  Misses        607      607           
  Partials      188      188           
Flag Coverage Δ
badger_v1 8.96% <ø> (ø)
badger_v2 1.63% <ø> (ø)
cassandra-4.x-v1-manual 14.93% <ø> (ø)
cassandra-4.x-v2-auto 1.57% <ø> (ø)
cassandra-4.x-v2-manual 1.57% <ø> (ø)
cassandra-5.x-v1-manual 14.93% <ø> (ø)
cassandra-5.x-v2-auto 1.57% <ø> (ø)
cassandra-5.x-v2-manual 1.57% <ø> (ø)
elasticsearch-6.x-v1 18.62% <ø> (ø)
elasticsearch-7.x-v1 18.69% <ø> (-0.01%) ⬇️
elasticsearch-8.x-v1 18.85% <ø> (-0.01%) ⬇️
elasticsearch-8.x-v2 1.62% <ø> (ø)
grpc_v1 10.58% <ø> (-0.01%) ⬇️
grpc_v2 7.95% <ø> (ø)
kafka-v1 9.28% <ø> (ø)
kafka-v2 1.63% <ø> (ø)
memory_v2 1.62% <ø> (-0.01%) ⬇️
opensearch-1.x-v1 18.74% <ø> (-0.01%) ⬇️
opensearch-2.x-v1 18.74% <ø> (-0.01%) ⬇️
opensearch-2.x-v2 1.62% <ø> (-0.01%) ⬇️
tailsampling-processor 0.45% <ø> (ø)
unittests 95.00% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rim99 rim99 marked this pull request as ready for review December 16, 2024 13:34
@rim99 rim99 requested a review from a team as a code owner December 16, 2024 13:34
@rim99 rim99 requested a review from albertteoh December 16, 2024 13:34
@rim99 rim99 changed the title Http api time window trace get [V3/API] Add time window for GetTrace http_gateway Dec 16, 2024
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.

lgtm. The DCO check is failing on some commits - might be easier to create a new PR with just your changes on top of most recent main

Comment on lines +98 to +99
expectedQuery spanstore.GetTraceParameters
params map[string]string
Copy link
Member

Choose a reason for hiding this comment

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

if params are the input please move them above the expected values, in both struct declaration and in the initialization below.

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

}

func TestHTTPGatewayGetTraceInternalErrors(t *testing.T) {
gw := setupHTTPGatewayNoServer(t, "")
// error from span reader
const simErr = "simulated error"
gw.reader.
On("GetTrace", matchContext, matchGetTraceParameters).
Return(nil, errors.New(simErr)).Once()
Copy link
Member

Choose a reason for hiding this comment

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

can use assert.AnError instead of simErr

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

@rim99
Copy link
Contributor Author

rim99 commented Dec 16, 2024

Use new PR: #6372

@rim99 rim99 closed this Dec 16, 2024
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