Refactor: Modularize ApiResponseHelper#createUsageResponse (4.22 Backport)#13695
Open
PrashantBhanage wants to merge 2 commits into
Open
Refactor: Modularize ApiResponseHelper#createUsageResponse (4.22 Backport)#13695PrashantBhanage wants to merge 2 commits into
PrashantBhanage wants to merge 2 commits into
Conversation
2 tasks
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:
|
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.
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.