From 39116f6fad70acacecdafb81d48dcfc759ce44db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20=22Kang=22=20P=C3=A9rez?= Date: Fri, 4 Oct 2024 10:30:14 +0200 Subject: [PATCH] Upgrade integrations SDK (NR-302384) (#108) * upgrade infra-sdk to a compatible v3 version * add entry to changelog * go mod tidy * go upgrade to 1.23.2 * add entry to changelog for go 1.22.3 --- CHANGELOG.md | 8 ++++++++ build/Dockerfile | 2 +- go.mod | 5 ++--- go.sum | 12 ++---------- src/arguments/arguments.go | 2 +- src/client/client.go | 2 +- src/entities/application.go | 4 ++-- src/entities/application_test.go | 2 +- src/entities/node.go | 6 +++--- src/entities/node_test.go | 2 +- src/entities/pool.go | 6 +++--- src/entities/pool_member.go | 6 +++--- src/entities/pool_test.go | 2 +- src/entities/system.go | 8 ++++---- src/entities/system_test.go | 2 +- src/entities/virtual_server.go | 6 +++--- src/entities/virtual_server_test.go | 2 +- src/f5.go | 4 ++-- 18 files changed, 40 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6937938..a8d7d0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ 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 + ## v2.7.7 - 2024-09-12 ### ⛓️ Dependencies diff --git a/build/Dockerfile b/build/Dockerfile index 319d890..49b8674 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 f77b779..6e457b8 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,14 @@ module github.com/newrelic/nri-f5 -go 1.23.1 +go 1.23.2 require ( - 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 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3bf157e..1461e42 100644 --- a/go.sum +++ b/go.sum @@ -1,17 +1,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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/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/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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/src/arguments/arguments.go b/src/arguments/arguments.go index ad6389f..44107f4 100644 --- a/src/arguments/arguments.go +++ b/src/arguments/arguments.go @@ -5,7 +5,7 @@ import ( "errors" "strings" - sdkArgs "github.com/newrelic/infra-integrations-sdk/args" + sdkArgs "github.com/newrelic/infra-integrations-sdk/v3/args" ) var ( diff --git a/src/client/client.go b/src/client/client.go index a72fc8a..0ec9211 100644 --- a/src/client/client.go +++ b/src/client/client.go @@ -9,7 +9,7 @@ import ( "strings" "time" - nrHttp "github.com/newrelic/infra-integrations-sdk/http" + nrHttp "github.com/newrelic/infra-integrations-sdk/v3/http" "github.com/newrelic/nri-f5/src/arguments" ) diff --git a/src/entities/application.go b/src/entities/application.go index 76f985f..19e125e 100644 --- a/src/entities/application.go +++ b/src/entities/application.go @@ -3,8 +3,8 @@ package entities 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-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/newrelic/nri-f5/src/definition" diff --git a/src/entities/application_test.go b/src/entities/application_test.go index 01309bd..5decb4d 100644 --- a/src/entities/application_test.go +++ b/src/entities/application_test.go @@ -6,7 +6,7 @@ import ( "sync" "testing" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/stretchr/testify/assert" diff --git a/src/entities/node.go b/src/entities/node.go index 8e30d77..936d8b6 100644 --- a/src/entities/node.go +++ b/src/entities/node.go @@ -3,9 +3,9 @@ package entities import ( "sync" - "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-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/newrelic/nri-f5/src/definition" diff --git a/src/entities/node_test.go b/src/entities/node_test.go index af145e2..65dbeb9 100644 --- a/src/entities/node_test.go +++ b/src/entities/node_test.go @@ -6,7 +6,7 @@ import ( "sync" "testing" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/stretchr/testify/assert" diff --git a/src/entities/pool.go b/src/entities/pool.go index 022d838..7c732df 100644 --- a/src/entities/pool.go +++ b/src/entities/pool.go @@ -3,9 +3,9 @@ package entities import ( "sync" - "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-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/newrelic/nri-f5/src/definition" diff --git a/src/entities/pool_member.go b/src/entities/pool_member.go index 511dd4c..bd9afb7 100644 --- a/src/entities/pool_member.go +++ b/src/entities/pool_member.go @@ -5,9 +5,9 @@ import ( "regexp" "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-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/newrelic/nri-f5/src/definition" diff --git a/src/entities/pool_test.go b/src/entities/pool_test.go index 0beb9d8..57a1ace 100644 --- a/src/entities/pool_test.go +++ b/src/entities/pool_test.go @@ -7,7 +7,7 @@ import ( "sync" "testing" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/stretchr/testify/assert" diff --git a/src/entities/system.go b/src/entities/system.go index 251de0b..b84bf56 100644 --- a/src/entities/system.go +++ b/src/entities/system.go @@ -5,10 +5,10 @@ import ( "strings" "sync" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "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/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/integration" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/newrelic/nri-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/newrelic/nri-f5/src/definition" diff --git a/src/entities/system_test.go b/src/entities/system_test.go index 10e51c7..e831373 100644 --- a/src/entities/system_test.go +++ b/src/entities/system_test.go @@ -6,7 +6,7 @@ import ( "sync" "testing" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/stretchr/testify/assert" diff --git a/src/entities/virtual_server.go b/src/entities/virtual_server.go index b9dc327..4f963a5 100644 --- a/src/entities/virtual_server.go +++ b/src/entities/virtual_server.go @@ -3,9 +3,9 @@ package entities import ( "sync" - "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-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/newrelic/nri-f5/src/definition" diff --git a/src/entities/virtual_server_test.go b/src/entities/virtual_server_test.go index 58fe056..6d61f8e 100644 --- a/src/entities/virtual_server_test.go +++ b/src/entities/virtual_server_test.go @@ -6,7 +6,7 @@ import ( "sync" "testing" - "github.com/newrelic/infra-integrations-sdk/integration" + "github.com/newrelic/infra-integrations-sdk/v3/integration" "github.com/newrelic/nri-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/stretchr/testify/assert" diff --git a/src/f5.go b/src/f5.go index aa5daac..f5a2a5c 100644 --- a/src/f5.go +++ b/src/f5.go @@ -9,8 +9,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-f5/src/arguments" "github.com/newrelic/nri-f5/src/client" "github.com/newrelic/nri-f5/src/entities"