From 5cf3d418b063ccd31939eec3dd857fce83b8ed40 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 4 Sep 2025 11:04:21 -0400 Subject: [PATCH] Move to supported version of yaml parser Signed-off-by: Davanum Srinivas --- config/config_test.go | 2 +- config/http_config.go | 2 +- config/http_config_test.go | 2 +- config/tls_config_test.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- model/metric.go | 2 +- model/metric_test.go | 2 +- promslog/slog_test.go | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/config_test.go b/config/config_test.go index f62b266af..9b0d0480a 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -21,7 +21,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v2" + "go.yaml.in/yaml/v2" ) func TestJSONMarshalSecret(t *testing.T) { diff --git a/config/http_config.go b/config/http_config.go index ad40fd936..4e5ff92a2 100644 --- a/config/http_config.go +++ b/config/http_config.go @@ -32,11 +32,11 @@ import ( "time" conntrack "github.com/mwitkow/go-conntrack" + "go.yaml.in/yaml/v2" "golang.org/x/net/http/httpproxy" "golang.org/x/net/http2" "golang.org/x/oauth2" "golang.org/x/oauth2/clientcredentials" - "gopkg.in/yaml.v2" ) var ( diff --git a/config/http_config_test.go b/config/http_config_test.go index 093ddedae..707d8880d 100644 --- a/config/http_config_test.go +++ b/config/http_config_test.go @@ -36,7 +36,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "gopkg.in/yaml.v2" + "go.yaml.in/yaml/v2" ) const ( diff --git a/config/tls_config_test.go b/config/tls_config_test.go index b43a1a166..f02c87fdd 100644 --- a/config/tls_config_test.go +++ b/config/tls_config_test.go @@ -26,7 +26,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v2" + "go.yaml.in/yaml/v2" ) // LoadTLSConfig parses the given file into a tls.Config. diff --git a/go.mod b/go.mod index 05ed079e7..72c951c8d 100644 --- a/go.mod +++ b/go.mod @@ -14,10 +14,10 @@ require ( github.com/prometheus/client_model v0.6.2 github.com/stretchr/testify v1.11.1 go.uber.org/atomic v1.11.0 + go.yaml.in/yaml/v2 v2.4.2 golang.org/x/net v0.43.0 golang.org/x/oauth2 v0.30.0 google.golang.org/protobuf v1.36.8 - gopkg.in/yaml.v2 v2.4.0 ) require ( diff --git a/go.sum b/go.sum index 79afe519c..bc996237d 100644 --- a/go.sum +++ b/go.sum @@ -47,6 +47,8 @@ github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8 github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= @@ -61,7 +63,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/model/metric.go b/model/metric.go index f7f61c5d5..4ee844cd7 100644 --- a/model/metric.go +++ b/model/metric.go @@ -24,8 +24,8 @@ import ( "github.com/grafana/regexp" dto "github.com/prometheus/client_model/go" + "go.yaml.in/yaml/v2" "google.golang.org/protobuf/proto" - "gopkg.in/yaml.v2" ) var ( diff --git a/model/metric_test.go b/model/metric_test.go index 7a4ee7b7a..e3573ed2c 100644 --- a/model/metric_test.go +++ b/model/metric_test.go @@ -24,8 +24,8 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/require" + "go.yaml.in/yaml/v2" "google.golang.org/protobuf/proto" - "gopkg.in/yaml.v2" ) func testMetric(t testing.TB) { diff --git a/promslog/slog_test.go b/promslog/slog_test.go index 0ab7c6309..01c4fc597 100644 --- a/promslog/slog_test.go +++ b/promslog/slog_test.go @@ -24,7 +24,7 @@ import ( "github.com/grafana/regexp" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v2" + "go.yaml.in/yaml/v2" ) var (