zitadel/internal/notification/handlers
Livio Spring 7f0378636b
fix(notifications): improve error handling (#8994)
# Which Problems Are Solved

While running the latest RC / main, we noticed some errors including
context timeouts and rollback issues.

# How the Problems Are Solved

- The transaction context is passed and used for any event being written
and for handling savepoints to be able to handle context timeouts.
- The user projection is not triggered anymore. This will reduce
unnecessary load and potential timeouts if lot of workers are running.
In case a user would not be projected yet, the request event will log an
error and then be skipped / retried on the next run.
- Additionally, the context is checked if being closed after each event
process.
- `latestRetries` now correctly only returns the latest retry events to
be processed
- Default values for notifications have been changed to run workers less
often, more retry delay, but less transaction duration.

# Additional Changes

None

# Additional Context

relates to #8931

---------

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
2024-12-04 20:17:49 +00:00
..
integration_test chore: remove parallel running in integration tests (#8904) 2024-11-27 15:32:13 +01:00
mock feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
already_handled.go fix: properly handle otp sms challenge notification in session api (#7653) 2024-03-27 19:48:14 +02:00
back_channel_logout.go feat(OIDC): add back channel logout (#8837) 2024-10-31 15:57:17 +01:00
commands.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
config_email.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
config_filesystem.go feat: call webhooks at least once (#5454) 2023-03-28 22:09:06 +00:00
config_log.go feat: call webhooks at least once (#5454) 2023-03-28 22:09:06 +00:00
config_sms.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
ctx.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
gen_mock.go fix: use triggering origin for notification links (#6628) 2023-10-10 13:20:53 +00:00
notification_worker_test.go fix(notifications): improve error handling (#8994) 2024-12-04 20:17:49 +00:00
notification_worker.go fix(notifications): improve error handling (#8994) 2024-12-04 20:17:49 +00:00
origin.go feat: trusted (instance) domains (#8369) 2024-07-31 18:00:38 +03:00
queries.go feat(OIDC): add back channel logout (#8837) 2024-10-31 15:57:17 +01:00
quota_notifier.go fix: properly handle otp sms challenge notification in session api (#7653) 2024-03-27 19:48:14 +02:00
telemetry_pusher.go perf(milestones): refactor (#8788) 2024-10-28 08:29:34 +00:00
translator.go feat: restrict languages (#6931) 2023-12-05 11:12:01 +00:00
user_notifier_test.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
user_notifier.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00