diff --git a/go.mod b/go.mod index 9e98c9a00d8..029fdf6ac4d 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/golang/snappy v0.0.4 github.com/google/gopacket v1.1.19 github.com/gorilla/mux v1.8.1 - github.com/grafana/dskit v0.0.0-20241212153328-e27df29220ea + github.com/grafana/dskit v0.0.0-20241216174023-0450f2ba7c3d github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/json-iterator/go v1.1.12 diff --git a/go.sum b/go.sum index 8c45d27ee4a..8c59c586240 100644 --- a/go.sum +++ b/go.sum @@ -1267,8 +1267,8 @@ github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc h1:PXZQA2WCxe85T github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc/go.mod h1:AHHlOEv1+GGQ3ktHMlhuTUwo3zljV3QJbC0+8o2kn+4= github.com/grafana/alerting v0.0.0-20241211182001-0f317eb6b2f7 h1:VGLUQ2mwzlF1NGwTxpSfv1RnuOsDlNh/NT5KRvhZ0sQ= github.com/grafana/alerting v0.0.0-20241211182001-0f317eb6b2f7/go.mod h1:QsnoKX/iYZxA4Cv+H+wC7uxutBD8qi8ZW5UJvD2TYmU= -github.com/grafana/dskit v0.0.0-20241212153328-e27df29220ea h1:hchD5kBCIEx+BH6neVQkC/d4pwGlGDP74CFkrB/KUpA= -github.com/grafana/dskit v0.0.0-20241212153328-e27df29220ea/go.mod h1:SPLNCARd4xdjCkue0O6hvuoveuS1dGJjDnfxYe405YQ= +github.com/grafana/dskit v0.0.0-20241216174023-0450f2ba7c3d h1:Fp40FtD0sR4z6Nb7tqoY0YOPmeNWNfH4UBpIGEMANjs= +github.com/grafana/dskit v0.0.0-20241216174023-0450f2ba7c3d/go.mod h1:SPLNCARd4xdjCkue0O6hvuoveuS1dGJjDnfxYe405YQ= github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc h1:BW+LjKJDz0So5LI8UZfW5neWeKpSkWqhmGjQFzcFfLM= github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc/go.mod h1:JVmqPBe8A/pZWwRoJW5ZjyALeY5OXMzPl7LrVXOdZAI= github.com/grafana/franz-go v0.0.0-20241009100846-782ba1442937 h1:fwwnG/NcygoS6XbAaEyK2QzMXI/BZIEJvQ3CD+7XZm8= diff --git a/vendor/github.com/grafana/dskit/loser/loser.go b/vendor/github.com/grafana/dskit/loser/loser.go index b02e29f6c3c..9da903b19fb 100644 --- a/vendor/github.com/grafana/dskit/loser/loser.go +++ b/vendor/github.com/grafana/dskit/loser/loser.go @@ -2,9 +2,9 @@ package loser -import "golang.org/x/exp/constraints" +import "cmp" -func New[E constraints.Ordered](lists [][]E, maxVal E) *Tree[E] { +func New[E cmp.Ordered](lists [][]E, maxVal E) *Tree[E] { nLists := len(lists) t := Tree[E]{ maxVal: maxVal, @@ -23,12 +23,12 @@ func New[E constraints.Ordered](lists [][]E, maxVal E) *Tree[E] { // A loser tree is a binary tree laid out such that nodes N and N+1 have parent N/2. // We store M leaf nodes in positions M...2M-1, and M-1 internal nodes in positions 1..M-1. // Node 0 is a special node, containing the winner of the contest. -type Tree[E constraints.Ordered] struct { +type Tree[E cmp.Ordered] struct { maxVal E nodes []node[E] } -type node[E constraints.Ordered] struct { +type node[E cmp.Ordered] struct { index int // This is the loser for all nodes except the 0th, where it is the winner. value E // Value copied from the loser node, or winner for node 0. items []E // Only populated for leaf nodes. diff --git a/vendor/github.com/grafana/dskit/ring/partition_instance_ring.go b/vendor/github.com/grafana/dskit/ring/partition_instance_ring.go index cffa4b2fcc5..1702d0cd827 100644 --- a/vendor/github.com/grafana/dskit/ring/partition_instance_ring.go +++ b/vendor/github.com/grafana/dskit/ring/partition_instance_ring.go @@ -2,9 +2,8 @@ package ring import ( "fmt" + "slices" "time" - - "golang.org/x/exp/slices" ) type PartitionRingReader interface { diff --git a/vendor/github.com/grafana/dskit/ring/partition_ring.go b/vendor/github.com/grafana/dskit/ring/partition_ring.go index 911de476c86..21ef2d7fdb9 100644 --- a/vendor/github.com/grafana/dskit/ring/partition_ring.go +++ b/vendor/github.com/grafana/dskit/ring/partition_ring.go @@ -5,11 +5,10 @@ import ( "fmt" "math" "math/rand" + "slices" "strconv" "time" - "golang.org/x/exp/slices" - shardUtil "github.com/grafana/dskit/ring/shard" ) diff --git a/vendor/github.com/grafana/dskit/ring/partition_ring_http.go b/vendor/github.com/grafana/dskit/ring/partition_ring_http.go index 8e58c58c7af..8fe3778eb38 100644 --- a/vendor/github.com/grafana/dskit/ring/partition_ring_http.go +++ b/vendor/github.com/grafana/dskit/ring/partition_ring_http.go @@ -6,11 +6,10 @@ import ( "fmt" "html/template" "net/http" + "slices" "sort" "strconv" "time" - - "golang.org/x/exp/slices" ) //go:embed partition_ring_status.gohtml diff --git a/vendor/github.com/grafana/dskit/ring/partition_ring_model.go b/vendor/github.com/grafana/dskit/ring/partition_ring_model.go index c95380756a3..f957fe6b831 100644 --- a/vendor/github.com/grafana/dskit/ring/partition_ring_model.go +++ b/vendor/github.com/grafana/dskit/ring/partition_ring_model.go @@ -2,12 +2,12 @@ package ring import ( "fmt" + "slices" "strconv" "strings" "time" "github.com/gogo/protobuf/proto" - "golang.org/x/exp/slices" "github.com/grafana/dskit/kv/codec" "github.com/grafana/dskit/kv/memberlist" diff --git a/vendor/github.com/grafana/dskit/ring/spread_minimizing_token_generator.go b/vendor/github.com/grafana/dskit/ring/spread_minimizing_token_generator.go index bd2ed9970a5..12ec23b2dc9 100644 --- a/vendor/github.com/grafana/dskit/ring/spread_minimizing_token_generator.go +++ b/vendor/github.com/grafana/dskit/ring/spread_minimizing_token_generator.go @@ -5,10 +5,9 @@ import ( "fmt" "math" "regexp" + "slices" "sort" "strconv" - - "golang.org/x/exp/slices" ) const ( diff --git a/vendor/github.com/grafana/dskit/ring/token_range.go b/vendor/github.com/grafana/dskit/ring/token_range.go index 1020ecd3326..1598defee63 100644 --- a/vendor/github.com/grafana/dskit/ring/token_range.go +++ b/vendor/github.com/grafana/dskit/ring/token_range.go @@ -2,9 +2,9 @@ package ring import ( "math" + "slices" "github.com/pkg/errors" - "golang.org/x/exp/slices" // using exp/slices until moving to go 1.21. ) // TokenRanges describes token ranges owned by an instance. diff --git a/vendor/github.com/grafana/dskit/ring/util.go b/vendor/github.com/grafana/dskit/ring/util.go index a21c0f2fe2c..910860cc805 100644 --- a/vendor/github.com/grafana/dskit/ring/util.go +++ b/vendor/github.com/grafana/dskit/ring/util.go @@ -3,11 +3,11 @@ package ring import ( "context" "math" + "slices" "sort" "time" "github.com/go-kit/log" - "golang.org/x/exp/slices" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/netutil" diff --git a/vendor/modules.txt b/vendor/modules.txt index 02ca98ac952..be4d2945012 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -620,7 +620,7 @@ github.com/grafana/alerting/receivers/webex github.com/grafana/alerting/receivers/webhook github.com/grafana/alerting/receivers/wecom github.com/grafana/alerting/templates -# github.com/grafana/dskit v0.0.0-20241212153328-e27df29220ea +# github.com/grafana/dskit v0.0.0-20241216174023-0450f2ba7c3d ## explicit; go 1.21 github.com/grafana/dskit/backoff github.com/grafana/dskit/ballast