-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
UI: Fix allocation count in CSI volumes table #9515
Conversation
The API doesn’t return the ReadAllocs and WriteAllocs for the index query, as discussed here: #9495 (comment) So this removes that, which will cause the allocation count in the table to be 0, as in the bug report.
This will more accurately reflect the API.
The API includes CurrentWriters and CurrentReaders in the collection response, so this uses that instead of counting WriteAllocs and ReadAllocs, which are not returned in the collection. The individual volume response doesn’t include CurrentWriters and CurrentReaders but their absence doesn’t erase the values.
This pull request is being automatically deployed with Vercel (learn more). nomad-storybook-and-ui – ./ui🔍 Inspect: https://vercel.com/hashicorp/nomad-storybook-and-ui/r7rmzrzwz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked this branch out locally to proxy against the real CSI API and it LGTM! Thanks @backspace!
Ember Asset Size actionAs of 94247f3 Files that got Bigger 🚨:
Files that stayed the same size 🤷:
|
Ember Test Audit comparison
|
Thank you both. I can also confirm that this PR fixes the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for jumping on this! After reading the original issue, this implementation makes sense to me.
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
As detailed in #9495, the collection query
GET /v1/volumes?type=csi
doesn’t returnReadAllocs
andWriteAllocs
, so the# Allocs
cell was always showing0
upon first load because it was derived from the lengths of those arrays. This uses the heretofore-ignoredCurrentReaders
andCurrentWriters
values to calculate the total instead.The single-resource query
GET /v1/volume/csi%2F:id
doesn’t returnCurrentReaders
andCurrentWriters
but you can see here that the missing values don’t cause the already-fetched ones to be deleted.Thanks to @apollo13 for reporting this in #9495 and to @tgross for the API logs and suggestion.