Skip to content

FINERACT-2570: Defer webhook/hook event publication to after transaction commit in batch requests with enclosingTransaction=true#5719

Open
rhopman wants to merge 1 commit intoapache:developfrom
symbaglobal:FINERACT-2570-defer-webhook-event-publication
Open

FINERACT-2570: Defer webhook/hook event publication to after transaction commit in batch requests with enclosingTransaction=true#5719
rhopman wants to merge 1 commit intoapache:developfrom
symbaglobal:FINERACT-2570-defer-webhook-event-publication

Conversation

@rhopman
Copy link
Copy Markdown
Contributor

@rhopman rhopman commented Mar 30, 2026

When a batch request uses enclosingTransaction: true, Fineract fires hook events (webhooks) inside the database transaction, before the batch has fully committed. If a later request in the batch fails, the entire batch is rolled back, but the webhook for the earlier (now rolled-back) request has already been dispatched.

This causes downstream systems that rely on webhooks (e.g. SMS notifications) to act on events that never actually persisted.

Checklist

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

@rhopman
Copy link
Copy Markdown
Contributor Author

rhopman commented Mar 30, 2026

Looks like the CI is failing because of an infrastructure issue. Can someone take a look and maybe re-run the checks?

2026-03-30T13:24:56.3956570Z FAILURE: Build failed with an exception.
2026-03-30T13:24:56.3956925Z 
2026-03-30T13:24:56.3957091Z * What went wrong:
2026-03-30T13:24:56.3957679Z Execution failed for task ':fineract-provider:jibDockerBuild'.
2026-03-30T13:24:56.3959077Z > com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: 500 Internal Server Error
2026-03-30T13:24:56.3975585Z   GET https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/76/76eb174b37c3e263a212412822299b58d4098a7f96715f18c7eb6932c98b7efd/data?expires=1774880096&signature=OlfqELvYwlHJGEujrzRogqXsb8U%3D&version=3
2026-03-30T13:24:56.3977588Z   <html>
2026-03-30T13:24:56.3978070Z   <head><title>500 Internal Server Error</title></head>
2026-03-30T13:24:56.3978911Z   <body>
2026-03-30T13:24:56.3979353Z   <center><h1>500 Internal Server Error</h1></center>
2026-03-30T13:24:56.3979917Z   <hr><center>cloudflare</center>
2026-03-30T13:24:56.3980387Z   </body>
2026-03-30T13:24:56.3980747Z   </html>

@rhopman rhopman force-pushed the FINERACT-2570-defer-webhook-event-publication branch from b1af246 to 76365cb Compare April 2, 2026 07:27
…ion commit in batch requests with enclosingTransaction=true
@rhopman rhopman force-pushed the FINERACT-2570-defer-webhook-event-publication branch from 76365cb to c899011 Compare April 3, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants