Skip to content

Commit

Permalink
Remove GetHeaders from logproto.VolumeResponse.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeschkies committed Oct 26, 2023
1 parent 0d7b6b2 commit 694ae9f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 0 additions & 4 deletions pkg/logproto/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,3 @@ func (m *VolumeRequest) LogToSpan(sp opentracing.Span) {
otlog.String("end", timestamp.Time(int64(m.Through)).String()),
)
}

func (*VolumeResponse) GetHeaders() []*definitions.PrometheusResponseHeader {
return nil
}
6 changes: 5 additions & 1 deletion pkg/querier/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ func (h *Handler) Do(ctx context.Context, req queryrangebase.Request) (queryrang
}
return &queryrange.IndexStatsResponse{Response: result}, nil
case *logproto.VolumeRequest:
return h.api.VolumeHandler(ctx, concrete)
result, err := h.api.VolumeHandler(ctx, concrete)
if err != nil {
return nil, err
}
return &queryrange.VolumeResponse{Response: result}, nil
default:
return nil, fmt.Errorf("unsupported query type %T", req)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/querier/queryrange/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ func NewEmptyResponse(r queryrangebase.Request) (queryrangebase.Response, error)
case *logproto.IndexStatsRequest:
return &logproto.IndexStatsResponse{}, nil
case *logproto.VolumeRequest:
return &logproto.VolumeResponse{}, nil
return &VolumeResponse{}, nil
default:
return nil, fmt.Errorf("unsupported request type %T", req)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/querier/queryrange/limits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func Test_MaxQueryLookBack_Types(t *testing.T) {
From: model.Time(now.UnixMilli()),
Through: model.Time(now.Add(-90 * time.Minute).UnixMilli()),
},
expectedResponse: &logproto.VolumeResponse{},
expectedResponse: &VolumeResponse{},
},
}

Expand Down

0 comments on commit 694ae9f

Please sign in to comment.