Skip to content

Commit

Permalink
Upgrade integrations SDK (NR-302384) (#180)
Browse files Browse the repository at this point in the history
* upgrade infra-sdk to a compatible v3 version

* add entry to changelog

* goimports

* go mod tidy

* go upgrade to 1.23.2

* add entry to changelog for go 1.22.3
  • Loading branch information
kang-makes authored Oct 4, 2024
1 parent 0efaa0f commit 76894d8
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 26 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

## v3.8.3 - 2024-09-10

### ⛓️ Dependencies
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23.1-bullseye
FROM golang:1.23.2-bullseye

ARG GH_VERSION='1.9.2'

Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
module github.com/newrelic/nri-oracledb

go 1.23.1
go 1.23.2

require (
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/godror/godror v0.44.0
github.com/jmoiron/sqlx v1.4.0
github.com/kr/pretty v0.3.1
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible
github.com/newrelic/infra-integrations-sdk/v3 v3.9.1
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/godror/knownpb v0.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
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/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc=
github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
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/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
Expand Down
3 changes: 2 additions & 1 deletion src/database/db_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package database
import (
"database/sql"
"errors"
"github.com/newrelic/infra-integrations-sdk/log"

"github.com/newrelic/infra-integrations-sdk/v3/log"

"github.com/jmoiron/sqlx"
)
Expand Down
4 changes: 2 additions & 2 deletions src/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"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-oracledb/src/database"
)

Expand Down
2 changes: 1 addition & 1 deletion src/inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/DATA-DOG/go-sqlmock"
_ "github.com/godror/godror"
"github.com/jmoiron/sqlx"
"github.com/newrelic/infra-integrations-sdk/integration"
"github.com/newrelic/infra-integrations-sdk/v3/integration"
"github.com/newrelic/nri-oracledb/src/database"
)

Expand Down
4 changes: 2 additions & 2 deletions src/metric_definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sync"

"github.com/godror/godror"
"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/log"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/log"
"github.com/newrelic/nri-oracledb/src/database"
)

Expand Down
8 changes: 4 additions & 4 deletions src/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"sync"

"github.com/godror/godror"
"github.com/newrelic/infra-integrations-sdk/data/attribute"
nrmetric "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"
nrmetric "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-oracledb/src/database"
"gopkg.in/yaml.v2"
)
Expand Down
2 changes: 1 addition & 1 deletion src/metrics_definitions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
sqlmock "github.com/DATA-DOG/go-sqlmock"
"github.com/jmoiron/sqlx"
"github.com/kr/pretty"
"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
"github.com/newrelic/nri-oracledb/src/database"
)

Expand Down
6 changes: 3 additions & 3 deletions src/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

sqlmock "github.com/DATA-DOG/go-sqlmock"
"github.com/jmoiron/sqlx"
"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic/infra-integrations-sdk/integration"
"github.com/newrelic/infra-integrations-sdk/persist"
"github.com/newrelic/infra-integrations-sdk/v3/data/metric"
"github.com/newrelic/infra-integrations-sdk/v3/integration"
"github.com/newrelic/infra-integrations-sdk/v3/persist"
"github.com/newrelic/nri-oracledb/src/database"
)

Expand Down
6 changes: 3 additions & 3 deletions src/oracledb.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/godror/godror"
"github.com/godror/godror/dsn"
"github.com/jmoiron/sqlx"
sdkArgs "github.com/newrelic/infra-integrations-sdk/args"
"github.com/newrelic/infra-integrations-sdk/integration"
"github.com/newrelic/infra-integrations-sdk/log"
sdkArgs "github.com/newrelic/infra-integrations-sdk/v3/args"
"github.com/newrelic/infra-integrations-sdk/v3/integration"
"github.com/newrelic/infra-integrations-sdk/v3/log"
"github.com/newrelic/nri-oracledb/src/database"
)

Expand Down

0 comments on commit 76894d8

Please sign in to comment.