Skip to content

Commit 77516e3

Browse files
committed
DefaultChunkedReadLimit was moved from storage to config
Signed-off-by: György Krajcsovits <[email protected]>
1 parent 6d0c68c commit 77516e3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

integration/e2emimir/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
promapi "github.com/prometheus/client_golang/api"
2929
promv1 "github.com/prometheus/client_golang/api/prometheus/v1"
3030
"github.com/prometheus/common/model"
31+
promConfig "github.com/prometheus/prometheus/config"
3132
"github.com/prometheus/prometheus/model/rulefmt"
3233
"github.com/prometheus/prometheus/prompb" // OTLP protos are not compatible with gogo
3334
"github.com/prometheus/prometheus/storage/remote"
@@ -351,7 +352,7 @@ func parseRemoteReadSamples(resp *http.Response) (*prompb.QueryResult, error) {
351352
}
352353

353354
func parseRemoteReadChunks(resp *http.Response) ([]prompb.ChunkedReadResponse, error) {
354-
stream := remote.NewChunkedReader(resp.Body, remote.DefaultChunkedReadLimit, nil)
355+
stream := remote.NewChunkedReader(resp.Body, promConfig.DefaultChunkedReadLimit, nil)
355356

356357
var results []prompb.ChunkedReadResponse
357358
for {

pkg/querier/remote_read_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"github.com/golang/snappy"
2020
"github.com/pkg/errors"
2121
"github.com/prometheus/common/model"
22+
"github.com/prometheus/prometheus/config"
2223
"github.com/prometheus/prometheus/model/labels"
2324
"github.com/prometheus/prometheus/prompb"
2425
"github.com/prometheus/prometheus/promql"
@@ -453,7 +454,7 @@ func TestRemoteReadHandler_StreamedXORChunks(t *testing.T) {
453454
require.Equal(t, 200, recorder.Result().StatusCode)
454455
require.Equal(t, []string{api.ContentTypeRemoteReadStreamedChunks}, recorder.Result().Header["Content-Type"])
455456

456-
stream := prom_remote.NewChunkedReader(recorder.Result().Body, prom_remote.DefaultChunkedReadLimit, nil)
457+
stream := prom_remote.NewChunkedReader(recorder.Result().Body, config.DefaultChunkedReadLimit, nil)
457458

458459
i := 0
459460
for {

0 commit comments

Comments
 (0)