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

chore: [M3-6232] - Update VolumeStatus type and logic #8862

Conversation

bnussman-akamai
Copy link
Member

Description 📝

  • We were not in sync with what the API actually returns for Volume statuses
  • This PR updates the api-v4 types
  • Also updates cloud manager to be more dynamic in the way Volume statuses are handled

Preview 📷

  • No visual changes

How to test 🧪

  • yarn test volume

  • Turn on the MSW to see all of the possible volume statuses on /volumes

@bnussman-akamai bnussman-akamai added the @linode/api-v4 Changes are made to the @linode/api-v4 package label Mar 9, 2023
@bnussman-akamai bnussman-akamai self-assigned this Mar 9, 2023
@@ -19,10 +19,8 @@ export type VolumeStatus =
| 'creating'
| 'active'
| 'resizing'
| 'deleting'
| 'deleted'
| 'migrating'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are status of migrating and offline just not documented in the API docs? The only statuses I saw in the enum were creating, active, and resizing, though I may have missed something.

I was curious when a volume would return a status of migrating; I had tried to migrate a Linode with an attached volume, the message said
Screenshot 2023-03-09 at 9 30 59 AM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. The API docs are wrong here. I test against my local API to verify what the API may actually return.

The status of migrating is left over from the HDD to NVME migration but is still possible from a technical perspective

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks for clarifying!

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit tests looked good and so do the MSW updates. I called out one note about the StatusIcon, but it's a minor copy change suggestion and so I'm going to go ahead and approve.

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

Can we give the Docs team a heads-up re: the accuracy of the status field enums?

@bnussman-akamai bnussman-akamai merged commit 52081c5 into linode:develop Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@linode/api-v4 Changes are made to the @linode/api-v4 package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants