civo / cli

Our Command Line Interface (CLI) for interacting with your Civo resources
Apache License 2.0
173 stars 86 forks source link

Listing firewall multiple times keeps showing different and incorrect networks #448

Open fernando-villalba opened 2 months ago

fernando-villalba commented 2 months ago

Issue

If you keep listing firewalls multiple times with

civo fw ls

You will see that the network keeps changing and it's not correct

Acceptance Criteria

Praveen005 commented 1 month ago

Hi @fernando-villalba

I couldn't re-create the first issue. I tried making firewalls with unique networks, multiple firewalls with same network, all the firewalls with default network. But civo fw ls gave me correct result every time. Am I getting it wrong?

Screenshot 2024-08-12 231840

As for making the order deterministic, I sorted the firewalls by ID and it solves the issue.

Screenshot 2024-08-12 221037
Praveen005 commented 1 month ago

Hi @uzaxirr,

This needs your attention too.

I tested again and the first part I couldn't recreate, to me it shows correct networks attached to their respective firewalls.

For the second part, sorting the slice of firewalls by ID, makes the order deterministic.

Thank you!

uzaxirr commented 1 month ago

hey @Praveen005 even i tried and was not able to reproduce the error

Praveen005 commented 1 month ago

Maybe the issue has been fixed on the API side, because I tried several times over the past few days. Should I raise the PR for the second part?