Skip to content

fix(volume): resolve Network and Instance lookup fallbacks in volume ls (fixes #597) - #598

Open
mahendrarathore1742 wants to merge 1 commit into
civo:masterfrom
mahendrarathore1742:fix/issue-597-volume-list-lookups
Open

fix(volume): resolve Network and Instance lookup fallbacks in volume ls (fixes #597)#598
mahendrarathore1742 wants to merge 1 commit into
civo:masterfrom
mahendrarathore1742:fix/issue-597-volume-list-lookups

Conversation

@mahendrarathore1742

@mahendrarathore1742 mahendrarathore1742 commented Aug 6, 2026

Copy link
Copy Markdown
### Summary
Fixes `civo volume ls` lookups for networks and instances so that unmatched items

safely fall back to raw IDs instead of showing unrelated names or breaking table column
alignment.

### Changes
- Replaced loop variable re-assignments with local fallback variables for network and

instance lookups.
- Ensured instance_id column is always appended once per row for consistent table
alignment.
- Added unit tests in cmd/volume/volume_list_test.go to verify matched and unmatched
fallback behavior.

Fixes #597

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.

volume ls shows the wrong instance (and network): unmatched lookup falls through to the last item in the list

1 participant