Skip to content

fix(cli): List mongodb storages returns empty result #778

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Benjosh95
Copy link

@Benjosh95 Benjosh95 commented Jun 4, 2025

Description

The issue is that the condition len(*options.Storages.Storages.StorageClasses) == 0 is incorrect - it's actually preventing the table from being displayed when there are storage classes available. It should be checking if the length is greater than 0, not equal to 0.

Jira-Ticket: stackitcli-200

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

Testing-Instructions

$ stackit mongodbflex options --flavor-id 1.2 --storages
returning a table with the requested content.

@rubenhoenle rubenhoenle force-pushed the fix/stackit-cli-200-empty-result branch from e236a9d to 66791b7 Compare June 6, 2025 08:10
@rubenhoenle
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants