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
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>
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.32%
- Complexity 16644 16646 +2
=========================================
Files 5939 5939
Lines 537787 537787
Branches 65932 65930 -2
=========================================
+ Hits 98544 98564 +20
+ Misses 428033 428013 -20
Partials 11210 11210
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
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)