Fix type parameter in listBackupServiceJobs API - #13940
Conversation
|
@winterhazel @weizhouapache I do not think this is a huge issue, but since the fix is simple, if there is a chance to add it to the next RC, it could be nice :) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13940 +/- ##
============================================
- Coverage 19.65% 19.65% -0.01%
+ Complexity 19803 19801 -2
============================================
Files 6368 6368
Lines 574935 574935
Branches 70358 70358
============================================
- Hits 113026 113011 -15
- Misses 449632 449649 +17
+ Partials 12277 12275 -2
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:
|
| private Pair<List<InternalBackupServiceJobVO>, Integer> listBackupServiceJobsInternal(ListBackupServiceJobsCmd cmd) { | ||
| return internalBackupServiceJobDao.searchAndCountForListApi(cmd.getId(), cmd.getBackupId(), cmd.getHostId(), cmd.getZoneId(), | ||
| InternalBackupServiceJobType.valueOf(cmd.getType()), cmd.getExecuting(), cmd.getScheduled(), cmd.getStartIndex(), cmd.getPageSizeVal()); | ||
| cmd.getType(), cmd.getExecuting(), cmd.getScheduled(), cmd.getStartIndex(), cmd.getPageSizeVal()); |
There was a problem hiding this comment.
note that is we propagate the enum to the parameter we can use the CSoC work by @dheeraj12347 for code completion/ parameter validation. (Last bit yet to be designed and worked on)
@JoaoJandre we can include it in 4.23 RC3 if it is ready for merge before #13821. |
|
@blueorangutan package |
|
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18945 |
Description
The parameter
typeof the listBackupServiceJobs is not required. However, the current implementation fails with a NPE if thetypeis not informed.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
I called the API informing the
typeparameter and it was OK. I then called the API without informing it and it was OK as well.