Skip to content

Commit

Permalink
Update deps and fix of source compatibility issues
Browse files Browse the repository at this point in the history
./
v1.16.11     ⇒ v1.30.3     	github.com/aws/aws-sdk-go-v2
v1.17.1      ⇒ v1.27.27    	github.com/aws/aws-sdk-go-v2/config
v1.54.0      ⇒ v1.173.0    	github.com/aws/aws-sdk-go-v2/service/ec2
v1.14.14     ⇒ v1.27.5     	github.com/aws/aws-sdk-go-v2/service/pi
v1.24.0      ⇒ v1.82.0     	github.com/aws/aws-sdk-go-v2/service/rds
v0.6.6       ⇒ v0.7.1      	github.com/montanaflynn/stats
v3.13.1      ⇒ v3.14.6     	github.com/schollz/progressbar/v3
v1.2.1       ⇒ v1.8.1      	github.com/spf13/cobra
v0.2.0       ⇒ v0.4.0      	go.uber.org/mock
  • Loading branch information
Dmitry Kolesnikov committed Aug 8, 2024
1 parent 26a4011 commit b35341f
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 641 deletions.
47 changes: 24 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,35 @@ module github.com/zalando/rds-health
go 1.21

require (
github.com/aws/aws-sdk-go-v2 v1.16.11
github.com/aws/aws-sdk-go-v2/config v1.17.1
github.com/aws/aws-sdk-go-v2/service/ec2 v1.54.0
github.com/aws/aws-sdk-go-v2/service/pi v1.14.14
github.com/aws/aws-sdk-go-v2/service/rds v1.24.0
github.com/aws/aws-sdk-go-v2 v1.30.3
github.com/aws/aws-sdk-go-v2/config v1.27.27
github.com/aws/aws-sdk-go-v2/service/ec2 v1.173.0
github.com/aws/aws-sdk-go-v2/service/pi v1.27.5
github.com/aws/aws-sdk-go-v2/service/rds v1.82.0
github.com/lynn9388/supsub v0.0.0-20210304091550-458423b0e16a
github.com/montanaflynn/stats v0.6.6
github.com/schollz/progressbar/v3 v3.13.1
github.com/spf13/cobra v1.2.1
go.uber.org/mock v0.2.0
github.com/montanaflynn/stats v0.7.1
github.com/schollz/progressbar/v3 v3.14.6
github.com/spf13/cobra v1.8.1
go.uber.org/mock v0.4.0
)

require (
github.com/aws/aws-sdk-go-v2/credentials v1.12.14 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 // indirect
github.com/aws/smithy-go v1.12.1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.27 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect
github.com/aws/smithy-go v1.20.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
)
663 changes: 54 additions & 609 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (api Cluster) toCluster(c rdstypes.DBCluster) types.Cluster {
node := types.Node{
Name: aws.ToString(member.DBInstanceIdentifier),
}
if member.IsClusterWriter {
if aws.ToBool(member.IsClusterWriter) {
cluster.Writer = append(cluster.Writer, node)
} else {
cluster.Reader = append(cluster.Reader, node)
Expand Down
4 changes: 2 additions & 2 deletions internal/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ func TestLookup(t *testing.T) {
DBClusterMembers: []rdstypes.DBClusterMember{
{
DBInstanceIdentifier: aws.String("test-1"),
IsClusterWriter: true,
IsClusterWriter: aws.Bool(true),
},
{
DBInstanceIdentifier: aws.String("test-2"),
IsClusterWriter: false,
IsClusterWriter: aws.Bool(false),
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (db *Database) toNode(instance rdstypes.DBInstance) types.Node {

storage := types.Storage{
Type: aws.ToString(instance.StorageType),
Size: types.BiB(instance.AllocatedStorage) * types.GiB,
Size: types.BiB(aws.ToInt32(instance.AllocatedStorage)) * types.GiB,
}

az := types.AvailabilityZones{}
Expand Down
4 changes: 2 additions & 2 deletions internal/database/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestLookupAllSuccess(t *testing.T) {
Engine: aws.String("postgres"),
EngineVersion: aws.String("13.14"),
StorageType: aws.String(""),
AllocatedStorage: 100,
AllocatedStorage: aws.Int32(100),
AvailabilityZone: aws.String("eu-central-1a"),
SecondaryAvailabilityZone: nil,
},
Expand Down Expand Up @@ -67,7 +67,7 @@ func TestLookupSuccess(t *testing.T) {
Engine: aws.String("postgres"),
EngineVersion: aws.String("13.14"),
StorageType: aws.String(""),
AllocatedStorage: 100,
AllocatedStorage: aws.Int32(100),
AvailabilityZone: aws.String("eu-central-1a"),
SecondaryAvailabilityZone: nil,
},
Expand Down
6 changes: 3 additions & 3 deletions internal/discovery/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func database(name string) rdstypes.DBInstance {
Engine: aws.String("postgres"),
EngineVersion: aws.String("13.14"),
StorageType: aws.String("gp2"),
AllocatedStorage: 100,
AllocatedStorage: aws.Int32(100),
AvailabilityZone: aws.String("eu-central-1a"),
SecondaryAvailabilityZone: nil,
}
Expand All @@ -119,14 +119,14 @@ func cluster(name string, writer string, reader string) rdstypes.DBCluster {
if writer != "" {
members = append(members, rdstypes.DBClusterMember{
DBInstanceIdentifier: aws.String(writer),
IsClusterWriter: true,
IsClusterWriter: aws.Bool(true),
})
}

if reader != "" {
members = append(members, rdstypes.DBClusterMember{
DBInstanceIdentifier: aws.String(reader),
IsClusterWriter: false,
IsClusterWriter: aws.Bool(false),
})
}

Expand Down

0 comments on commit b35341f

Please sign in to comment.