Skip to content

Commit 8c699c3

Browse files
authored
Upgrade integrations SDK (NR-302384) (#207)
* upgrade infra-sdk to a compatible v3 version * add entry to changelog * goimports * go mod tidy * go upgrade to 1.23.2 * remove old build comment * add entry to changelog for go 1.22.3
1 parent 8368bf7 commit 8c699c3

File tree

20 files changed

+41
-31
lines changed

20 files changed

+41
-31
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Unreleased section should follow [Release Toolkit](https://github.com/newrelic/r
88

99
## Unreleased
1010

11+
### dependency
12+
13+
- Upgrade go to 1.23.2
14+
15+
### enhancements
16+
17+
- Upgrade integrations SDK so the interval is variable and allows intervals up to 5 minutes
18+
1119
## v1.5.4 - 2024-09-12
1220

1321
### ⛓️ Dependencies

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23.1-bookworm
1+
FROM golang:1.23.2-bookworm
22

33
ARG GH_VERSION='2.4.0'
44

cmd/nri-vsphere/nri-vsphere.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"runtime"
1111
"strings"
1212

13-
"github.com/newrelic/infra-integrations-sdk/integration"
13+
"github.com/newrelic/infra-integrations-sdk/v3/integration"
1414
"github.com/newrelic/nri-vsphere/internal/client"
1515
"github.com/newrelic/nri-vsphere/internal/collect"
1616
"github.com/newrelic/nri-vsphere/internal/config"

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/newrelic/nri-vsphere
22

3-
go 1.23.1
3+
go 1.23.2
44

55
require (
6-
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible
6+
github.com/newrelic/infra-integrations-sdk/v3 v3.9.1
77
github.com/sirupsen/logrus v1.9.3
88
github.com/stretchr/testify v1.9.0
99
github.com/vmware/govmomi v0.36.3
@@ -14,7 +14,6 @@ require (
1414
require (
1515
github.com/davecgh/go-spew v1.1.1 // indirect
1616
github.com/google/uuid v1.6.0 // indirect
17-
github.com/pkg/errors v0.9.1 // indirect
1817
github.com/pmezard/go-difflib v1.0.0 // indirect
1918
github.com/rogpeppe/go-internal v1.12.0 // indirect
2019
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect

go.sum

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
22
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
5+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
56
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
67
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
78
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
9+
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
810
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
9-
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible h1:Ktcm1aPAl7CW3o+FXAIKJ+jygWVXDXaUIWFyf2CXQTk=
10-
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible/go.mod h1:tMUHRMq6mJS0YyBnbWrTXAnREnQqC1AGO6Lu45u5xAM=
11-
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
12-
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
11+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
12+
github.com/newrelic/infra-integrations-sdk/v3 v3.9.1 h1:dCtVLsYNHWTQ5aAlAaHroomOUlqxlGTrdi6XTlvBDfI=
13+
github.com/newrelic/infra-integrations-sdk/v3 v3.9.1/go.mod h1:yPeidhcq9Cla0QDquGXH0KqvS2k9xtetFOD7aLA0Z8M=
1314
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1415
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
1516
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
@@ -34,6 +35,7 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9w
3435
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3536
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
3637
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
38+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
3739
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
3840
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
3941
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

integration-test/integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build integration
1+
//go:build integration
22

33
/*
44
* Copyright 2020 New Relic Corporation. All rights reserved.
@@ -27,7 +27,7 @@ import (
2727
"github.com/vmware/govmomi/vim25"
2828
)
2929

30-
//This can set whn running the test as -ldflags "-X github.com/newrelic/nri-winservices/test.integrationPath="
30+
// This can set when running the test as -ldflags "-X github.com/newrelic/nri-winservices/test.integrationPath="
3131
var (
3232
integrationPath = "../bin/nri-vsphere"
3333
)

internal/cache/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"time"
66

7-
"github.com/newrelic/infra-integrations-sdk/persist"
7+
"github.com/newrelic/infra-integrations-sdk/v3/persist"
88
)
99

1010
type Cache struct {

internal/cache/cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"testing"
55
"time"
66

7-
"github.com/newrelic/infra-integrations-sdk/persist"
7+
"github.com/newrelic/infra-integrations-sdk/v3/persist"
88
"github.com/stretchr/testify/assert"
99
)
1010

internal/collect/datacenters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"context"
88
"time"
99

10-
"github.com/newrelic/infra-integrations-sdk/persist"
10+
"github.com/newrelic/infra-integrations-sdk/v3/persist"
1111
"github.com/newrelic/nri-vsphere/internal/cache"
1212
"github.com/newrelic/nri-vsphere/internal/config"
1313
"github.com/newrelic/nri-vsphere/internal/events"

internal/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"github.com/newrelic/nri-vsphere/internal/performance"
1414
"github.com/newrelic/nri-vsphere/internal/tag"
1515

16-
sdkArgs "github.com/newrelic/infra-integrations-sdk/args"
17-
"github.com/newrelic/infra-integrations-sdk/integration"
16+
sdkArgs "github.com/newrelic/infra-integrations-sdk/v3/args"
17+
"github.com/newrelic/infra-integrations-sdk/v3/integration"
1818
logrus "github.com/sirupsen/logrus"
1919
"github.com/vmware/govmomi"
2020
"github.com/vmware/govmomi/view"

0 commit comments

Comments
 (0)