Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade integrations SDK (NR-302384) #207

Merged
merged 7 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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

## v1.5.4 - 2024-09-12

### ⛓️ Dependencies
Expand Down
2 changes: 1 addition & 1 deletion cmd/nri-vsphere/nri-vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"runtime"
"strings"

"github.com/newrelic/infra-integrations-sdk/integration"
"github.com/newrelic/infra-integrations-sdk/v3/integration"
"github.com/newrelic/nri-vsphere/internal/client"
"github.com/newrelic/nri-vsphere/internal/collect"
"github.com/newrelic/nri-vsphere/internal/config"
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/newrelic/nri-vsphere
go 1.23.1

require (
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible
github.com/newrelic/infra-integrations-sdk/v3 v3.9.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
github.com/vmware/govmomi v0.36.3
Expand All @@ -14,7 +14,6 @@ require (
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
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/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
Expand All @@ -34,6 +35,7 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9w
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
2 changes: 1 addition & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/newrelic/infra-integrations-sdk/persist"
"github.com/newrelic/infra-integrations-sdk/v3/persist"
)

type Cache struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/newrelic/infra-integrations-sdk/persist"
"github.com/newrelic/infra-integrations-sdk/v3/persist"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/collect/datacenters.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"time"

"github.com/newrelic/infra-integrations-sdk/persist"
"github.com/newrelic/infra-integrations-sdk/v3/persist"
"github.com/newrelic/nri-vsphere/internal/cache"
"github.com/newrelic/nri-vsphere/internal/config"
"github.com/newrelic/nri-vsphere/internal/events"
Expand Down
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/newrelic/nri-vsphere/internal/performance"
"github.com/newrelic/nri-vsphere/internal/tag"

sdkArgs "github.com/newrelic/infra-integrations-sdk/args"
"github.com/newrelic/infra-integrations-sdk/integration"
sdkArgs "github.com/newrelic/infra-integrations-sdk/v3/args"
"github.com/newrelic/infra-integrations-sdk/v3/integration"
logrus "github.com/sirupsen/logrus"
"github.com/vmware/govmomi"
"github.com/vmware/govmomi/view"
Expand Down
2 changes: 1 addition & 1 deletion internal/process/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/newrelic/nri-vsphere/internal/config"

"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
)

func createClusterSamples(config *config.Config) {
Expand Down
6 changes: 3 additions & 3 deletions internal/process/datacenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/newrelic/nri-vsphere/internal/config"

eventSDK "github.com/newrelic/infra-integrations-sdk/data/event"
"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/integration"
eventSDK "github.com/newrelic/infra-integrations-sdk/v3/data/event"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/integration"
"github.com/newrelic/nri-vsphere/internal/events"
logrus "github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/process/datastores.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/newrelic/nri-vsphere/internal/config"

"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
"github.com/vmware/govmomi/vim25/types"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/process/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/newrelic/nri-vsphere/internal/config"

"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
)

func createHostSamples(config *config.Config) {
Expand Down
4 changes: 2 additions & 2 deletions internal/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"sync"

"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-vsphere/internal/config"

logrus "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion internal/process/resourcepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package process

import (
"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
"github.com/newrelic/nri-vsphere/internal/config"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/process/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types"

"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"
)

const invalidFile = -1
Expand Down
2 changes: 1 addition & 1 deletion internal/process/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types"

"github.com/newrelic/infra-integrations-sdk/integration"
"github.com/newrelic/infra-integrations-sdk/v3/integration"
"github.com/newrelic/nri-vsphere/internal/process/testdata"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/process/vms.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
"github.com/newrelic/nri-vsphere/internal/config"
)

Expand Down
5 changes: 3 additions & 2 deletions internal/process/vms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package process

import (
"context"
"github.com/newrelic/infra-integrations-sdk/integration"
"testing"

"github.com/newrelic/infra-integrations-sdk/v3/integration"
"github.com/newrelic/nri-vsphere/internal/client"
"github.com/newrelic/nri-vsphere/internal/collect"
"github.com/newrelic/nri-vsphere/internal/config"
Expand All @@ -13,7 +15,6 @@ import (
"github.com/vmware/govmomi/view"
"github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/mo"
"testing"
)

func Test_createVirtualMachineSamples_HasIpAddresses(t *testing.T) {
Expand Down
Loading