Codebase
Original feature issue: #139
Golden implementation PR: #161
Golden implementation branch: task/#139-Implement-User-Notification-System
Auto-generated implementation branch: toloka-agent/139-auto
Auto implementation with golden tests branch: toloka-agent/139-auto-golden-test
Problem
When a release is updated via PUT /releases/{code} and transitions to a status that triggers notification to be sent, the release entity is saved to the database before the notification logic runs. If an error happens during notification creation this will abort the transaction and not save the release, but is json marshalling fails – then we got a problem! The exception is silently swallowed — the release ends up with the new status committed, but no notifications are stored. Of course we see the error in the logs, but the data will be corrupted.
ToDo
Abort the transaction and not save the release if any error occurs during notifications creation.
Codebase
Original feature issue: #139
Golden implementation PR: #161
Golden implementation branch:
task/#139-Implement-User-Notification-SystemAuto-generated implementation branch:
toloka-agent/139-autoAuto implementation with golden tests branch:
toloka-agent/139-auto-golden-testProblem
When a release is updated via
PUT /releases/{code}and transitions to a status that triggers notification to be sent, the release entity is saved to the database before the notification logic runs. If an error happens during notification creation this will abort the transaction and not save the release, but is json marshalling fails – then we got a problem! The exception is silently swallowed — the release ends up with the new status committed, but no notifications are stored. Of course we see the error in the logs, but the data will be corrupted.ToDo
Abort the transaction and not save the release if any error occurs during notifications creation.