Repository navigation
Report a failed automigrate on volume resize instead of throwing NPE - #14752
Open
bhouse-nexthop wants to merge 1 commit into
Open
bhouse-nexthop wants to merge 1 commit into
bhouse-nexthop wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14752 +/- ##
============================================
+ Coverage 18.32% 18.35% +0.02%
- Complexity 16644 16677 +33
============================================
Files 5939 5939
Lines 537787 537814 +27
Branches 65932 65935 +3
============================================
+ Hits 98544 98701 +157
+ Misses 428033 427882 -151
- Partials 11210 11231 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 tasks done
sathvikaragi
reviewed
Dec 1, 2026
When resizeVolume needs to move the volume to another pool and migrateVolume returns null, the code set `volume` to null and then called `volume.getUuid()` to build the error, both in the try and in the catch. The caller got a NullPointerException. | path | before | after | |---|---|---| | resizeVolume, migration returns null | NullPointerException | "... the migration did not return the migrated volume" | | resizeVolume, migration throws | generic error, cause dropped | error includes the cause message and keeps it as cause | | changeOfferingForVolume, migration returns null | message said "volume: null" | names the volume | | changeOfferingForVolume, either case | named the first suitable pool, not the one tried | names the pool actually tried | - Move the migrate-and-check into one helper used by both paths. - Add unit tests for the null and exception cases of resizeVolume and the null case of changeOfferingForVolume. Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop
force-pushed
the
volume-resize-automigrate-npe
branch
from
December 1, 2026 13:10
7b28ff5 to
77ee0de
Compare
bhouse-nexthop
added a commit
to bhouse-nexthop/cloudstack
that referenced
this pull request
Dec 1, 2026
Review follow-up for apache#14752: use StringUtils.defaultIfBlank so a blank exception message falls back to the exception's class name, and test it. Signed-off-by: Brad House <bhouse@nexthop.ai> (cherry picked from commit 2ca4f611a587c496988232a2f40e1d7ba2795b0d)
bhouse-nexthop
added a commit
to bhouse-nexthop/cloudstack
that referenced
this pull request
Dec 1, 2026
Review follow-up for apache#14752: use StringUtils.defaultIfBlank so a blank exception message falls back to the exception's class name, and test it. Signed-off-by: Brad House <bhouse@nexthop.ai> (cherry picked from commit 8ee20bf3eaab8fee83e5f1890ade953bd302e4a4)
sathvikaragi
approved these changes
Dec 1, 2026
This branch has not been deployed
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
Fixes #14751
Types of changes
Bug Severity
How Has This Been Tested?
VolumeApiServiceImplTest(148 tests, 3 new)