Skip to content

Commit

Permalink
Upgrade dskit (grafana#10249)
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn authored Aug 15, 2023
1 parent 287f29b commit 611481b
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 58 deletions.
8 changes: 8 additions & 0 deletions docs/sources/configure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,14 @@ Configures the `server` of the launched module(s).
[tls_min_version: <string> | default = ""]
http_tls_config:
# Server TLS certificate. This configuration parameter is YAML only.
[cert: <string> | default = ""]
# Server TLS key. This configuration parameter is YAML only.
[key: <string> | default = ""]
# Root certificate authority used to verify client certificates. This
# configuration parameter is YAML only.
[client_ca: <string> | default = ""]
# HTTP server cert path.
Expand All @@ -288,10 +292,14 @@ http_tls_config:
[client_ca_file: <string> | default = ""]
grpc_tls_config:
# Server TLS certificate. This configuration parameter is YAML only.
[cert: <string> | default = ""]
# Server TLS key. This configuration parameter is YAML only.
[key: <string> | default = ""]
# Root certificate authority used to verify client certificates. This
# configuration parameter is YAML only.
[client_ca: <string> | default = ""]
# GRPC TLS server cert path.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.5.0
github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2
github.com/grafana/dskit v0.0.0-20230811062909-a2c425ae7975
github.com/grafana/dskit v0.0.0-20230814145153-042a71bd637e
github.com/grafana/go-gelf/v2 v2.0.1
github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,8 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad
github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY=
github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 h1:qhugDMdQ4Vp68H0tp/0iN17DM2ehRo1rLEdOFe/gB8I=
github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2/go.mod h1:w/aiO1POVIeXUQyl0VQSZjl5OAGDTL5aX+4v0RA1tcw=
github.com/grafana/dskit v0.0.0-20230811062909-a2c425ae7975 h1:rCBTyr4vKVNh+synt3A3o3jxgcLSk/y958iOdfaIjW0=
github.com/grafana/dskit v0.0.0-20230811062909-a2c425ae7975/go.mod h1:clB9S8ZI/5NiIMCnRv0rA60xs2y1iyVGmO4E5Z8nueE=
github.com/grafana/dskit v0.0.0-20230814145153-042a71bd637e h1:8u1RKsS5CJeOlbGcuBC8/LyEywI7mPQj3d3Sqk+5hQ8=
github.com/grafana/dskit v0.0.0-20230814145153-042a71bd637e/go.mod h1:SA90oxyODAYOFCW/O1HrS5Zu/zhNzh+yF4D+GoWmBEk=
github.com/grafana/go-gelf/v2 v2.0.1 h1:BOChP0h/jLeD+7F9mL7tq10xVkDG15he3T1zHuQaWak=
github.com/grafana/go-gelf/v2 v2.0.1/go.mod h1:lexHie0xzYGwCgiRGcvZ723bSNyNI8ZRD4s0CLobh90=
github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 h1:xLuzPoOzdfNb/RF/IENCw+oLVdZB4G21VPhkHBgwSHY=
Expand Down
15 changes: 8 additions & 7 deletions pkg/storage/chunk/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
"sync"
"unsafe"

errs "errors"

"github.com/golang/snappy"
errs "github.com/grafana/dskit/errors"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/prometheus/common/model"
Expand All @@ -20,12 +21,12 @@ import (
"github.com/grafana/loki/pkg/logproto"
)

const (
ErrInvalidChecksum = errs.Error("invalid chunk checksum")
ErrWrongMetadata = errs.Error("wrong chunk metadata")
ErrMetadataLength = errs.Error("chunk metadata wrong length")
ErrDataLength = errs.Error("chunk data wrong length")
ErrSliceOutOfRange = errs.Error("chunk can't be sliced out of its data range")
var (
ErrInvalidChecksum = errs.New("invalid chunk checksum")
ErrWrongMetadata = errs.New("wrong chunk metadata")
ErrMetadataLength = errs.New("chunk metadata wrong length")
ErrDataLength = errs.New("chunk data wrong length")
ErrSliceOutOfRange = errs.New("chunk can't be sliced out of its data range")
)

var castagnoliTable = crc32.MakeTable(crc32.Castagnoli)
Expand Down
12 changes: 6 additions & 6 deletions pkg/storage/chunk/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ package chunk

import (
"context"
"errors"
"io"

errs "github.com/grafana/dskit/errors"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/labels"

"github.com/grafana/loki/pkg/util/filter"
)

const (
// ChunkLen is the length of a chunk in bytes.
ChunkLen = 1024
// ChunkLen is the length of a chunk in bytes.
const ChunkLen = 1024

ErrSliceNoDataInRange = errs.Error("chunk has no data for given range to slice")
ErrSliceChunkOverflow = errs.Error("slicing should not overflow a chunk")
var (
ErrSliceNoDataInRange = errors.New("chunk has no data for given range to slice")
ErrSliceChunkOverflow = errors.New("slicing should not overflow a chunk")
)

// Data is the interface for all chunks. Chunks are generally not
Expand Down
5 changes: 4 additions & 1 deletion vendor/github.com/grafana/dskit/backoff/backoff.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions vendor/github.com/grafana/dskit/errors/error.go

This file was deleted.

17 changes: 0 additions & 17 deletions vendor/github.com/grafana/dskit/grpcutil/util.go

This file was deleted.

6 changes: 3 additions & 3 deletions vendor/github.com/grafana/dskit/server/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions vendor/github.com/grafana/dskit/user/id.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ github.com/gorilla/websocket
# github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2
## explicit; go 1.17
github.com/grafana/cloudflare-go
# github.com/grafana/dskit v0.0.0-20230811062909-a2c425ae7975
# github.com/grafana/dskit v0.0.0-20230814145153-042a71bd637e
## explicit; go 1.19
github.com/grafana/dskit/aws
github.com/grafana/dskit/backoff
Expand All @@ -835,7 +835,6 @@ github.com/grafana/dskit/crypto/tls
github.com/grafana/dskit/dns
github.com/grafana/dskit/dns/godns
github.com/grafana/dskit/dns/miekgdns
github.com/grafana/dskit/errors
github.com/grafana/dskit/flagext
github.com/grafana/dskit/grpcclient
github.com/grafana/dskit/grpcencoding/snappy
Expand Down

0 comments on commit 611481b

Please sign in to comment.