vultr-cli
vultr-cli copied to clipboard
[BUG] - Managed Databases options Return GO Errors and No results
trafficstars
Describe the bug
Most Vultr Managed Databases options return GO errors during execution. In particular, most options return errors when executed while database-specific commands such as vultr-cli database list, vultr-cli database get , vultr-cli database db list work without issues.
To Reproduce Steps to reproduce the behavior:
- Enter a Vultr Managed Databases command such as
vultr-cli database plan list - See the error in your output similar to the one below.
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xe52cdd]
goroutine 1 [running]:
github.com/vultr/vultr-cli/v3/cmd/database.(*PlansPrinter).Data(0xc0003e3cc0)
github.com/vultr/vultr-cli/v3/cmd/database/printer.go:627 +0x31d
github.com/vultr/vultr-cli/v3/cmd/printer.(*Output).Display(0xc00002b980, {0x10ab440, 0xc0003e3cc0}, {0x0?, 0x0?})
github.com/vultr/vultr-cli/v3/cmd/printer/printer.go:79 +0x138
github.com/vultr/vultr-cli/v3/cmd/database.NewCmdDatabase.func10(0xc00020b700?, {0x1452920?, 0x4?, 0xfb4014?})
github.com/vultr/vultr-cli/v3/cmd/database/database.go:499 +0xed
github.com/spf13/cobra.(*Command).execute(0xc00018c608, {0x1452920, 0x0, 0x0})
github.com/spf13/[email protected]/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x1406700)
github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:1041
github.com/vultr/vultr-cli/v3/cmd.Execute()
github.com/vultr/vultr-cli/v3/cmd/root.go:64 +0x1a
main.main()
github.com/vultr/vultr-cli/v3/main.go:7 +0xf
Expected behavior Expected to receive plan information. Tried other options as well apart from the plan, and received similar errors. In particular, when querying and creating PostgreSQL clusters. For example:
vultr-cli database create --database-engine pg --database-engine-version 17 --plan vultr-dbaas-hobbyist-cc-1-25-1 --region ewr --label "testdb"
Error: error creating database : json: cannot unmarshal object into Go struct field Database.database.trusted_ips of type []string