From 7cbf749096302f87c928f8f19fea136467355a31 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Wed, 5 Mar 2025 16:03:25 +0100 Subject: [PATCH] Upgrade to github.com/oklog/ulid/v2 (#16168) Signed-off-by: Arve Knudsen --- cmd/promtool/backfill.go | 2 +- go.mod | 3 ++- go.sum | 3 +++ tsdb/block.go | 2 +- tsdb/blockwriter.go | 2 +- tsdb/compact.go | 2 +- tsdb/compact_test.go | 2 +- tsdb/db.go | 2 +- tsdb/db_test.go | 2 +- tsdb/head.go | 2 +- tsdb/ooo_head_read.go | 2 +- tsdb/querier.go | 2 +- tsdb/querier_test.go | 2 +- 13 files changed, 16 insertions(+), 12 deletions(-) diff --git a/cmd/promtool/backfill.go b/cmd/promtool/backfill.go index 473ea036ec..0964f0d546 100644 --- a/cmd/promtool/backfill.go +++ b/cmd/promtool/backfill.go @@ -21,7 +21,7 @@ import ( "math" "time" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/common/promslog" diff --git a/go.mod b/go.mod index 7509c5e2ee..16367a2c6d 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 github.com/oklog/run v1.1.0 - github.com/oklog/ulid v1.3.1 + github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.118.0 github.com/ovh/go-ovh v1.6.0 github.com/prometheus/alertmanager v0.28.0 @@ -170,6 +170,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.118.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.118.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect diff --git a/go.sum b/go.sum index 5cf3e3ab67..8212e5854b 100644 --- a/go.sum +++ b/go.sum @@ -387,6 +387,8 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= +github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= @@ -410,6 +412,7 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/tsdb/block.go b/tsdb/block.go index ae20c174d6..da7fbf0c34 100644 --- a/tsdb/block.go +++ b/tsdb/block.go @@ -26,7 +26,7 @@ import ( "slices" "sync" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/common/promslog" diff --git a/tsdb/blockwriter.go b/tsdb/blockwriter.go index 63f82e28df..5eb8a649a9 100644 --- a/tsdb/blockwriter.go +++ b/tsdb/blockwriter.go @@ -21,7 +21,7 @@ import ( "math" "os" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/storage" diff --git a/tsdb/compact.go b/tsdb/compact.go index 31b445f227..0e2c0485d9 100644 --- a/tsdb/compact.go +++ b/tsdb/compact.go @@ -25,7 +25,7 @@ import ( "slices" "time" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/promslog" diff --git a/tsdb/compact_test.go b/tsdb/compact_test.go index 6e3db15eb4..898411bef6 100644 --- a/tsdb/compact_test.go +++ b/tsdb/compact_test.go @@ -28,7 +28,7 @@ import ( "testing" "time" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" prom_testutil "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/common/promslog" "github.com/stretchr/testify/require" diff --git a/tsdb/db.go b/tsdb/db.go index 9ab150c5b4..f5cb53ac70 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -30,7 +30,7 @@ import ( "sync" "time" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/promslog" "go.uber.org/atomic" diff --git a/tsdb/db_test.go b/tsdb/db_test.go index ab2ece9e3b..4811923e7c 100644 --- a/tsdb/db_test.go +++ b/tsdb/db_test.go @@ -37,7 +37,7 @@ import ( "testing" "time" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/client_golang/prometheus" prom_testutil "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/common/promslog" diff --git a/tsdb/head.go b/tsdb/head.go index 9c1b9d8f46..67fdbab646 100644 --- a/tsdb/head.go +++ b/tsdb/head.go @@ -26,7 +26,7 @@ import ( "sync" "time" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "go.uber.org/atomic" "github.com/prometheus/client_golang/prometheus" diff --git a/tsdb/ooo_head_read.go b/tsdb/ooo_head_read.go index 6ab99a96e6..5eb63edfd5 100644 --- a/tsdb/ooo_head_read.go +++ b/tsdb/ooo_head_read.go @@ -20,7 +20,7 @@ import ( "math" "slices" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" diff --git a/tsdb/querier.go b/tsdb/querier.go index 676bcf4627..5d9801f2b8 100644 --- a/tsdb/querier.go +++ b/tsdb/querier.go @@ -20,7 +20,7 @@ import ( "math" "slices" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/tsdb/querier_test.go b/tsdb/querier_test.go index 56249d3bd6..5b1bcef7c2 100644 --- a/tsdb/querier_test.go +++ b/tsdb/querier_test.go @@ -26,7 +26,7 @@ import ( "testing" "time" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/stretchr/testify/require" "github.com/prometheus/prometheus/model/histogram"