From ed73044608fcdd40a0d3a59bc3d52a0e5f2ee158 Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Wed, 2 Oct 2024 15:40:28 +0200 Subject: [PATCH 1/7] upgrade infra-sdk to a compatible v3 version --- go.mod | 2 +- go.sum | 2 ++ src/arguments/arguments.go | 4 ++-- src/connection/info.go | 2 +- src/entities/cluster.go | 4 ++-- src/entities/collect.go | 6 +++--- src/entities/collect_test.go | 2 +- src/entities/collection.go | 4 ++-- src/entities/collection_test.go | 2 +- src/entities/config.go | 6 +++--- src/entities/config_test.go | 2 +- src/entities/database.go | 4 ++-- src/entities/database_test.go | 2 +- src/entities/entities.go | 4 ++-- src/entities/host.go | 4 ++-- src/entities/host_test.go | 4 ++-- src/entities/mongod.go | 6 +++--- src/entities/mongod_test.go | 2 +- src/entities/mongos.go | 6 +++--- src/entities/mongos_test.go | 2 +- src/entities/shard.go | 2 +- src/entities/shard_test.go | 2 +- src/filter/database_filter.go | 2 +- src/mongodb.go | 4 ++-- src/test/fake_session.go | 2 +- src/workers.go | 4 ++-- src/workers_test.go | 4 ++-- tests/integration/helpers/helpers.go | 2 +- tests/integration/mongodb_test.go | 2 +- 29 files changed, 48 insertions(+), 46 deletions(-) diff --git a/go.mod b/go.mod index 9880049..5254a53 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23.1 require ( github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 - github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible + github.com/newrelic/infra-integrations-sdk/v3 v3.9.1 github.com/stretchr/testify v1.9.0 github.com/xeipuuv/gojsonschema v1.2.0 ) diff --git a/go.sum b/go.sum index abcda7a..cbdac73 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/newrelic/infra-integrations-sdk v3.8.0+incompatible h1:QvwHLsgHyGw4ZU github.com/newrelic/infra-integrations-sdk v3.8.0+incompatible/go.mod h1:tMUHRMq6mJS0YyBnbWrTXAnREnQqC1AGO6Lu45u5xAM= github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible h1:Ktcm1aPAl7CW3o+FXAIKJ+jygWVXDXaUIWFyf2CXQTk= github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible/go.mod h1:tMUHRMq6mJS0YyBnbWrTXAnREnQqC1AGO6Lu45u5xAM= +github.com/newrelic/infra-integrations-sdk/v3 v3.9.1 h1:dCtVLsYNHWTQ5aAlAaHroomOUlqxlGTrdi6XTlvBDfI= +github.com/newrelic/infra-integrations-sdk/v3 v3.9.1/go.mod h1:yPeidhcq9Cla0QDquGXH0KqvS2k9xtetFOD7aLA0Z8M= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/src/arguments/arguments.go b/src/arguments/arguments.go index f13d0f1..301adbc 100644 --- a/src/arguments/arguments.go +++ b/src/arguments/arguments.go @@ -5,8 +5,8 @@ import ( "fmt" "strconv" - sdkArgs "github.com/newrelic/infra-integrations-sdk/args" - "github.com/newrelic/infra-integrations-sdk/log" + sdkArgs "github.com/newrelic/infra-integrations-sdk/v3/args" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/filter" ) diff --git a/src/connection/info.go b/src/connection/info.go index 31e98ff..f51f4aa 100644 --- a/src/connection/info.go +++ b/src/connection/info.go @@ -12,7 +12,7 @@ import ( "time" "github.com/globalsign/mgo" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" ) // Info is a storage struct which holds all the diff --git a/src/entities/cluster.go b/src/entities/cluster.go index dc0b3f1..56718a5 100644 --- a/src/entities/cluster.go +++ b/src/entities/cluster.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/connection" ) diff --git a/src/entities/collect.go b/src/entities/collect.go index cc7abdc..854d95d 100644 --- a/src/entities/collect.go +++ b/src/entities/collect.go @@ -6,9 +6,9 @@ import ( "time" "github.com/globalsign/mgo/bson" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/connection" "github.com/newrelic/nri-mongodb/src/metrics" ) diff --git a/src/entities/collect_test.go b/src/entities/collect_test.go index 41b62c5..3258541 100644 --- a/src/entities/collect_test.go +++ b/src/entities/collect_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/globalsign/mgo/bson" - "github.com/newrelic/infra-integrations-sdk/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" "github.com/newrelic/nri-mongodb/src/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/src/entities/collection.go b/src/entities/collection.go index e0547aa..277b15b 100644 --- a/src/entities/collection.go +++ b/src/entities/collection.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/connection" "github.com/newrelic/nri-mongodb/src/filter" ) diff --git a/src/entities/collection_test.go b/src/entities/collection_test.go index 406e59b..32649ff 100644 --- a/src/entities/collection_test.go +++ b/src/entities/collection_test.go @@ -3,7 +3,7 @@ package entities import ( "testing" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/filter" "github.com/newrelic/nri-mongodb/src/test" "github.com/stretchr/testify/assert" diff --git a/src/entities/config.go b/src/entities/config.go index 887b234..c56e19e 100644 --- a/src/entities/config.go +++ b/src/entities/config.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/integration" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/connection" ) diff --git a/src/entities/config_test.go b/src/entities/config_test.go index 33335ec..1891692 100644 --- a/src/entities/config_test.go +++ b/src/entities/config_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/mock" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/test" "github.com/stretchr/testify/assert" ) diff --git a/src/entities/database.go b/src/entities/database.go index 65ef661..3a62c26 100644 --- a/src/entities/database.go +++ b/src/entities/database.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/connection" "github.com/newrelic/nri-mongodb/src/filter" ) diff --git a/src/entities/database_test.go b/src/entities/database_test.go index fff7681..b190bb6 100644 --- a/src/entities/database_test.go +++ b/src/entities/database_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/mock" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/filter" "github.com/newrelic/nri-mongodb/src/test" "github.com/stretchr/testify/assert" diff --git a/src/entities/entities.go b/src/entities/entities.go index 198ab98..24ebc66 100644 --- a/src/entities/entities.go +++ b/src/entities/entities.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/newrelic/infra-integrations-sdk/integration" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/connection" ) diff --git a/src/entities/host.go b/src/entities/host.go index 3f0de18..b170f0f 100644 --- a/src/entities/host.go +++ b/src/entities/host.go @@ -5,8 +5,8 @@ import ( "strconv" "strings" - "github.com/newrelic/infra-integrations-sdk/integration" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" ) // hostCollector is a base collector for any entity that represents a specific host diff --git a/src/entities/host_test.go b/src/entities/host_test.go index 1fa23a9..f7d31c0 100644 --- a/src/entities/host_test.go +++ b/src/entities/host_test.go @@ -6,8 +6,8 @@ import ( "github.com/globalsign/mgo/bson" "github.com/stretchr/testify/mock" - "github.com/newrelic/infra-integrations-sdk/data/inventory" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/data/inventory" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/test" "github.com/stretchr/testify/assert" ) diff --git a/src/entities/mongod.go b/src/entities/mongod.go index 1f771f9..7cc4225 100644 --- a/src/entities/mongod.go +++ b/src/entities/mongod.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/integration" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/connection" "github.com/newrelic/nri-mongodb/src/metrics" ) diff --git a/src/entities/mongod_test.go b/src/entities/mongod_test.go index 94f2474..8610fdf 100644 --- a/src/entities/mongod_test.go +++ b/src/entities/mongod_test.go @@ -3,7 +3,7 @@ package entities import ( "testing" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/test" "github.com/stretchr/testify/assert" diff --git a/src/entities/mongos.go b/src/entities/mongos.go index 1a4090c..bbf8240 100644 --- a/src/entities/mongos.go +++ b/src/entities/mongos.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/integration" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/connection" ) diff --git a/src/entities/mongos_test.go b/src/entities/mongos_test.go index 0283009..65db336 100644 --- a/src/entities/mongos_test.go +++ b/src/entities/mongos_test.go @@ -6,7 +6,7 @@ import ( "github.com/globalsign/mgo/bson" "github.com/stretchr/testify/mock" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/test" "github.com/stretchr/testify/assert" ) diff --git a/src/entities/shard.go b/src/entities/shard.go index 4c2703e..e47c138 100644 --- a/src/entities/shard.go +++ b/src/entities/shard.go @@ -1,7 +1,7 @@ package entities import ( - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/connection" ) diff --git a/src/entities/shard_test.go b/src/entities/shard_test.go index b2e1abd..fa8d2e6 100644 --- a/src/entities/shard_test.go +++ b/src/entities/shard_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/test" ) diff --git a/src/filter/database_filter.go b/src/filter/database_filter.go index 8b8320d..544f59d 100644 --- a/src/filter/database_filter.go +++ b/src/filter/database_filter.go @@ -4,7 +4,7 @@ package filter import ( "encoding/json" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" ) // DatabaseFilter represents a map of database and collection names to collect diff --git a/src/mongodb.go b/src/mongodb.go index b2bbcaa..1e2257c 100644 --- a/src/mongodb.go +++ b/src/mongodb.go @@ -8,8 +8,8 @@ import ( "strings" "sync" - "github.com/newrelic/infra-integrations-sdk/integration" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/arguments" "github.com/newrelic/nri-mongodb/src/connection" "github.com/newrelic/nri-mongodb/src/entities" diff --git a/src/test/fake_session.go b/src/test/fake_session.go index d224dc5..656b78c 100644 --- a/src/test/fake_session.go +++ b/src/test/fake_session.go @@ -5,7 +5,7 @@ import ( "time" "github.com/globalsign/mgo/bson" - "github.com/newrelic/infra-integrations-sdk/data/inventory" + "github.com/newrelic/infra-integrations-sdk/v3/data/inventory" "github.com/newrelic/nri-mongodb/src/connection" ) diff --git a/src/workers.go b/src/workers.go index 9d88eb3..ec69ada 100644 --- a/src/workers.go +++ b/src/workers.go @@ -3,8 +3,8 @@ package main import ( "sync" - "github.com/newrelic/infra-integrations-sdk/integration" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/src/connection" "github.com/newrelic/nri-mongodb/src/entities" "github.com/newrelic/nri-mongodb/src/filter" diff --git a/src/workers_test.go b/src/workers_test.go index 0d3a1f5..6afbd20 100644 --- a/src/workers_test.go +++ b/src/workers_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/globalsign/mgo/bson" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-mongodb/src/connection" "github.com/newrelic/nri-mongodb/src/entities" "github.com/newrelic/nri-mongodb/src/test" diff --git a/tests/integration/helpers/helpers.go b/tests/integration/helpers/helpers.go index 3af9bb1..16ec5ef 100644 --- a/tests/integration/helpers/helpers.go +++ b/tests/integration/helpers/helpers.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" ) // GetTestName returns the name of the running test. diff --git a/tests/integration/mongodb_test.go b/tests/integration/mongodb_test.go index 04856a8..7e363d2 100644 --- a/tests/integration/mongodb_test.go +++ b/tests/integration/mongodb_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-mongodb/tests/integration/helpers" "github.com/newrelic/nri-mongodb/tests/integration/jsonschema" "github.com/stretchr/testify/assert" From 4249c439a9765f2f64706428ef486c3f06b6ae54 Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Wed, 2 Oct 2024 16:34:36 +0200 Subject: [PATCH 2/7] add entry to changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63310d8..826bcdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ Unreleased section should follow [Release Toolkit](https://github.com/newrelic/r ## Unreleased +### enhancements + +- Upgrade integrations SDK so the interval is variable and allows intervals up to 5 minutes + ## v2.8.7 - 2024-09-10 ### ⛓️ Dependencies From bca93ab004d51c44f2e506ebc427dc30c686bd8c Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Wed, 2 Oct 2024 17:08:33 +0200 Subject: [PATCH 3/7] goimports --- tests/integration/mongodb_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/mongodb_test.go b/tests/integration/mongodb_test.go index 7e363d2..42a724d 100644 --- a/tests/integration/mongodb_test.go +++ b/tests/integration/mongodb_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package integration From c8a423546775917ba34982e5c920dd7edc80fb88 Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Wed, 2 Oct 2024 17:18:09 +0200 Subject: [PATCH 4/7] go mod tidy --- go.mod | 1 - go.sum | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/go.mod b/go.mod index 5254a53..d5ddbc7 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,6 @@ require ( require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect diff --git a/go.sum b/go.sum index cbdac73..bb30f25 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,4 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= @@ -9,29 +8,14 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/newrelic/infra-integrations-sdk v3.7.3+incompatible h1:+o/MxTzFsC3BRVKpkw1pXer9Nja2mxWNbV9GfH7iKBc= -github.com/newrelic/infra-integrations-sdk v3.7.3+incompatible/go.mod h1:tMUHRMq6mJS0YyBnbWrTXAnREnQqC1AGO6Lu45u5xAM= -github.com/newrelic/infra-integrations-sdk v3.8.0+incompatible h1:QvwHLsgHyGw4ZULOSnnWQnVPE744K1eda+2XLp2eHtg= -github.com/newrelic/infra-integrations-sdk v3.8.0+incompatible/go.mod h1:tMUHRMq6mJS0YyBnbWrTXAnREnQqC1AGO6Lu45u5xAM= -github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible h1:Ktcm1aPAl7CW3o+FXAIKJ+jygWVXDXaUIWFyf2CXQTk= -github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible/go.mod h1:tMUHRMq6mJS0YyBnbWrTXAnREnQqC1AGO6Lu45u5xAM= github.com/newrelic/infra-integrations-sdk/v3 v3.9.1 h1:dCtVLsYNHWTQ5aAlAaHroomOUlqxlGTrdi6XTlvBDfI= github.com/newrelic/infra-integrations-sdk/v3 v3.9.1/go.mod h1:yPeidhcq9Cla0QDquGXH0KqvS2k9xtetFOD7aLA0Z8M= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= @@ -43,6 +27,5 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From e93e145dd8a1f5ae1515ea4416f381dd234621d1 Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Thu, 3 Oct 2024 09:49:36 +0200 Subject: [PATCH 5/7] go upgrade to 1.23.2 --- build/Dockerfile | 2 +- go.mod | 2 +- tests/integration/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index a1ec8a7..fc3651d 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.1-bookworm +FROM golang:1.23.2-bookworm ARG GH_VERSION='1.9.2' diff --git a/go.mod b/go.mod index d5ddbc7..5e246e6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/newrelic/nri-mongodb -go 1.23.1 +go 1.23.2 require ( github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 diff --git a/tests/integration/Dockerfile b/tests/integration/Dockerfile index 2c53814..aaab0a6 100644 --- a/tests/integration/Dockerfile +++ b/tests/integration/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.1-bookworm as builder +FROM golang:1.23.2-bookworm as builder ARG CGO_ENABLED=0 WORKDIR /go/src/github.com/newrelic/nri-mongodb COPY . . From cdc89fc6784715e74f11d9d27bac7f0812fa9364 Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Thu, 3 Oct 2024 10:29:50 +0200 Subject: [PATCH 6/7] remove old build comment --- tests/integration/mongodb_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/mongodb_test.go b/tests/integration/mongodb_test.go index 42a724d..d86f356 100644 --- a/tests/integration/mongodb_test.go +++ b/tests/integration/mongodb_test.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package integration From b706622f14f58d1dcad1f328c211e824defa870a Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Thu, 3 Oct 2024 10:56:19 +0200 Subject: [PATCH 7/7] add entry to changelog for go 1.22.3 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 826bcdd..46a97cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ Unreleased section should follow [Release Toolkit](https://github.com/newrelic/r ## Unreleased +### dependency + +- Upgrade go to 1.23.2 + ### enhancements - Upgrade integrations SDK so the interval is variable and allows intervals up to 5 minutes