Skip to content

Release can be updated without sending notifications in case of error #292

@innokenty

Description

@innokenty

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions