fineract icon indicating copy to clipboard operation
fineract copied to clipboard

FINERACT-2493: New command processing - job scheduling

Open nidhiii128 opened this issue 6 months ago • 11 comments

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 / UpdateJobResponse POJOs with Jakarta Validation
  • New UpdateJobCommand and UpdateJobCommandHandler using CommandHandler<REQ, RES>
  • SchedularWritePlatformService.updateJobDetail signature changed to accept typed request
  • Change-detection logic moved from entity into service (per Aleks's guidance)
  • Hand-written JobDetailDataValidator no longer called, replaced by @AssertTrue annotations
  • 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 avatar May 28 '26 07:05 nidhiii128

@nidhiii128 Fix that failing checks.

Aman-Mittal avatar May 30 '26 13:05 Aman-Mittal

@vidakovic please review

Aman-Mittal avatar May 31 '26 07:05 Aman-Mittal

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?

nidhiii128 avatar Jun 05 '26 08:06 nidhiii128

@vidakovic please review again.

Aman-Mittal avatar Jun 05 '26 13:06 Aman-Mittal

@nidhiii128 @Aman-Mittal note for upcoming PRs: can you resolve the conversations that are fixed please? Makes it easier to do the reviews. Thanks.

vidakovic avatar Jun 10 '26 13:06 vidakovic

@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.

vidakovic avatar Jun 12 '26 11:06 vidakovic

@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 avatar Jun 12 '26 14:06 nidhiii128

@nidhiii128 Please resolve the conflicts

adamsaghy avatar Jun 29 '26 08:06 adamsaghy

@nidhiii128 Please resolve the conflicts

@adamsaghy solved the conflicts.

nidhiii128 avatar Jun 29 '26 10:06 nidhiii128

@nidhiii128 Unrelated changes are being shown

Aman-Mittal avatar Jul 03 '26 18:07 Aman-Mittal

@nidhiii128 Unrelated changes are being shown

yess resolving

nidhiii128 avatar Jul 03 '26 18:07 nidhiii128