Refactor: Modularize ApiResponseHelper#createUsageResponse (4.22 Backport)#13695
Refactor: Modularize ApiResponseHelper#createUsageResponse (4.22 Backport)#13695PrashantBhanage wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13695 +/- ##
=============================================
- Coverage 17.69% 3.69% -14.01%
=============================================
Files 5925 449 -5476
Lines 533534 38176 -495358
Branches 65273 7072 -58201
=============================================
- Hits 94421 1409 -93012
+ Misses 428434 36580 -391854
+ Partials 10679 187 -10492
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:
|
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18672 |
|
Note: This is the 4.22 LTS backport of PR #13490 as requested by @DaanHoogland.
Fixes #11635
Description
This PR addresses the technical debt in
ApiResponseHelper#createUsageResponse(Usage)by modularizing the 530-line method.populateUsageTypeSpecificDetails.UsageTypeto improve maintainability and readability.UsageResourceDetailscontainer class to safely manage and returnresourceIdandresourceTypestate for tag lookups.mainPR has been intentionally excluded from this backport to avoid framework conflicts with the stable 4.22 LTS testing architecture.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
N/A (Pure backend refactoring)
How Has This Been Tested?
.toString()type mismatch in usage entity lookups to ensureSimulator CIpasses cleanly on the LTS branch.How did you try to break this feature and the system with this change?
This is a pure structural refactor. Carefully verified that no business logic, string formatting, or calculations were altered.