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

Update deps and fix of source compatibility issues #13

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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: 2 additions & 2 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
## actions/[email protected]
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

## dominikh/[email protected].0
- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc
## dominikh/[email protected].1
- uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6
with:
install-go: false
51 changes: 27 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
module github.com/zalando/rds-health

go 1.21
go 1.22

toolchain go1.22.0

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.31.0
github.com/aws/aws-sdk-go-v2/config v1.27.37
github.com/aws/aws-sdk-go-v2/service/ec2 v1.179.0
github.com/aws/aws-sdk-go-v2/service/pi v1.28.1
github.com/aws/aws-sdk-go-v2/service/rds v1.85.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.16.0
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.35 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.23.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.31.1 // indirect
github.com/aws/smithy-go v1.21.0 // 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.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
)
671 changes: 59 additions & 612 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
Loading