FINERACT-2493: New command processing - job scheduling
Description
Migrates the "update job" REST endpoint (by jobId) from the legacy command-processing path to the new fineract-command framework.
Scope (PR 1 of 2 for FINERACT-2493)
- New typed
UpdateJobRequest/UpdateJobResponsePOJOs with Jakarta Validation - New
UpdateJobCommandandUpdateJobCommandHandlerusingCommandHandler<REQ, RES> SchedularWritePlatformService.updateJobDetailsignature changed to accept typed request- Change-detection logic moved from entity into service (per Aleks's guidance)
- Hand-written
JobDetailDataValidatorno longer called, replaced by@AssertTrueannotations - Backward-compatible: existing integration tests pass unchanged
Not in this PR
- "Update job by short-name" - deferred pending Aleks's guidance on where short-name resolution should live
- "Execute job" migration - separate follow-up PR
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [ ] Write the commit message as per our guidelines
- [ ] Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
- [ ] Create/update unit or integration tests for verifying the changes made.
- [ ] Follow our coding conventions.
- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
- [ ] This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.
Your assigned reviewer(s) will follow our guidelines for code reviews.
@nidhiii128 Fix that failing checks.
@vidakovic please review
Hi @vidakovic, thank you, I've addressed all your comments:
Renamed DTOs and handlers to follow the [Domain][Action][Suffix] pattern (JobUpdateRequest, JobUpdateResponse, JobUpdateCommandHandler) Removed the trivial @ApiResponse(200) annotation Removed @Autowired and switched to @RequiredArgsConstructor Folded jobId into the request object in SchedulerJobHelper Moved findByJobId and retrieveSchedulerDetail out of the write service — created a new ScheduledJobReadService interface in fineract-provider (since the domain types aren't accessible from fineract-core, the interface lives in fineract-provider and SchedulerJobRunnerReadServiceImpl implements it). This took a bit of investigation to get right given the module boundaries, but I think the result cleanly separates the read concerns. Could you please take another look when you get a chance?
@vidakovic please review again.
@nidhiii128 @Aman-Mittal note for upcoming PRs: can you resolve the conversations that are fixed please? Makes it easier to do the reviews. Thanks.
@nidhiii128 looks very good... could you just clarify on my last comment? And fixing whatever is currently breaking the build (documentation)? I think then we should be good to go. Thanks again for the patience.
@nidhiii128 looks very good... could you just clarify on my last comment? And fixing whatever is currently breaking the build (documentation)? I think then we should be good to go. Thanks again for the patience.
Hi @vidakovic, thanks! Fixed the documentation build. The documentation check now passes. Only failing check remaining is run-api-backward-compatibility (the pre-approved @ApiResponse(200) removal). Ready for re-review whenever you have a chance.
@nidhiii128 Please resolve the conflicts
@nidhiii128 Please resolve the conflicts
@adamsaghy solved the conflicts.
@nidhiii128 Unrelated changes are being shown
@nidhiii128 Unrelated changes are being shown
yess resolving