cli icon indicating copy to clipboard operation
cli copied to clipboard

Redundant dangling info message when listing volumes

Open fernando-villalba opened this issue 10 months ago • 3 comments

Issue

Listing volumes always outputs the following message

Info: Volumes with status 'dangling' mean they are attached to a cluster that no longer exists. You can attach them to an instance, or delete them if they are no longer needed.

This is even when no volumes are dangling as shown here:

Info: Volumes with status 'dangling' mean they are attached to a cluster that no longer exists. You can attach them to an instance, or delete them if they are no longer needed.
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| ID                                   | Name                                     | Network | Cluster | Instance | Size | Mount Point | Status    |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| e92316eb-68f7-40c7-9267-336d3b14c296 | pvc-7d9a3697-abd2-427a-88a1-96bc3f115b31 | default |         |          | 1 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| f2490c59-6389-45d5-85b8-c505715e6e07 | pvc-bf12fcfe-91f2-41cb-944f-8f20308ab634 | default |         |          | 1 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| 2ab0aa3c-39e7-4276-bb83-bcd3c64a7f29 | pvc-66f4a2b3-210c-440d-8c9b-70aa3df8424b | default |         |          | 5 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| 7a1bc293-a8ea-4b3c-b501-0ab9e114e97e | pvc-3ac366c1-3c60-468d-afec-369934c15590 | default |         |          | 5 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| d2d4e79a-37b1-4700-8f6c-da4cf5c70054 | pvc-6181b098-2907-4c07-a1a3-e2671fd3e355 | default |         |          | 5 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| 23d5d8e8-72b6-48ff-83fc-af3df6cfe9e5 | pvc-5b65b99b-0a70-4d79-9c46-eba00e979677 | default |         |          | 5 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| facd043c-4dc1-42fe-90ad-6c719349c611 | pvc-e81b6517-28f4-4b6b-be97-ba14dc6d1750 | default |         |          | 1 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+
| ab096c53-afaa-405c-8380-1cec1e6bf46d | pvc-9a141453-e111-4188-baa0-cec1ae33912d | default |         |          | 1 GB |             | available |
+--------------------------------------+------------------------------------------+---------+---------+----------+------+-------------+-----------+

This info message is annoying and it provides no value to the users other than confusing them.

Acceptance Criteria

  • Only provide this message if a volume is actually dangling and add recommendations on how to handle the situation. Maybe link to documentation, I've actually never seen a volume with status dangling.

fernando-villalba avatar Apr 26 '24 11:04 fernando-villalba

imo it should always be displayed irrespective if dangling volumes are found or not. Its just an info tag for the user

uzaxirr avatar Apr 28 '24 07:04 uzaxirr

@uzaxirr can you elaborate why you think it should always be displayed? To be precise, if no volume is dangling and there is no action that the user needs to take and the user does not benefit from this information, what's the value of displaying this?

fernando-villalba avatar May 17 '24 10:05 fernando-villalba

Let me put it another way. If I ask you what ice cream flavours you have, and every time you tell me to watch out for peanuts in the flavours, as a user (especially if I have a peanut allergy), I waste time looking at every flavour and worrying to search which one has peanuts, and if I don't see any peanuts, I may still be paranoid thinking one of them may have.

If instead you only give me that warning when one of the flavours has indeed peanuts, I waste less time and I get less worried, hence, it's better user experience over all.

Any logging output of this kind is an opportunity for us to have a conversation with the user. It should be precise and helpful. While it's often better to have more information than no information, it's always best to provide contextual, helpful information that's related to what the user is doing of what they need to do.

fernando-villalba avatar May 17 '24 10:05 fernando-villalba

Closing as completed in - https://github.com/civo/cli/pull/423

haardikdharma10 avatar Jun 10 '24 18:06 haardikdharma10