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

[BUG] - Managed Databases options Return GO Errors and No results #512

Open
mjhumphrey4 opened this issue Feb 26, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@mjhumphrey4
Copy link

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:

  1. Enter a Vultr Managed Databases command such as vultr-cli database plan list
  2. 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
@mjhumphrey4 mjhumphrey4 added the bug Something isn't working label Feb 26, 2025
@optik-aper
Copy link
Member

@mjhumphrey4 This could be a result of not having recently released code changes since I'm not seeing these errors on master. I'm going to push through a new release this week and would appreciate it if you could test it on the new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants