[CCS-5] Volume Resize Fix for IOPS and Size - #106
Open
suryag1201 wants to merge 1 commit into
Open
suryag1201 wants to merge 1 commit into
suryag1201 wants to merge 1 commit into
Conversation
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.75% |
| Branch coverage | 18.87% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Resize Volume, the form did not show the volume’s current size and IOPS. It also used the first disk offering in the list, not the offering already attached to the volume.
So the dialog often opened empty or with the wrong IOPS fields, and a resize could send the wrong values.
Root cause
Three UI issues in fetchData():
Size unit — the API stores size in bytes. The form label is GB. Size was never copied onto the form, so the GB field stayed empty.
Wrong offering — the code always used this.offerings[0] (first offering returned by listDiskOfferings), not this.resource.diskofferingid (the volume’s offering). Custom size / custom IOPS flags could be wrong.
IOPS not filled — even when min/max IOPS existed on the volume, they were not copied into form.miniops / form.maxiops.
Steps to reproduce
Create a volume with a custom IOPS disk offering (for example min 2000, max 5000) and a known size (for example 20 GB).
Open Storage → Volumes → Resize.
Check the Size (GB) field and the Min/Max IOPS fields.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Before Fix:

After Fix:

How Has This Been Tested?
Tested with both Fix and Custom IOPS:
1- Resize Shows IOPS value for custom IOPS not for fix, along with size
2- Exact 20 GB volume → shows as 20
float 20.1 -> shows on UI as 20
How did you try to break this feature and the system with this change?