Repository navigation
#62 Notify the end of the process executions with Symfony Notifier - #133
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #62
Notify the end of the process executions (failures, warnings...) with Symfony Notifier, configured globally and overridden by process.
Changes
ProcessExecutionEndedEvent(new): dispatched byProcessEventSubscriberwhen a top-level process execution has ended and has been saved (not for sub-processes), with theProcessExecutionentity and the error of a failed execution. It does not requiresymfony/notifier: listen to it to send your own notifications. New optional$eventDispatcherargument ofProcessEventSubscriber(no BC break).ProcessExecutionNotifier(new, listener of this event): sends aProcessExecutionNotificationwhen the notification is enabled and the end of the execution is among the configured statuses.NotificationTriggerstatuses:failed;finish_with_report(finished with log levels counted in its report, seelogs.report_increment_level; custom report keys are ignored);finish.Process "app.import" failed), content (status, start date, duration, reported log levels, error, log file, execution id), exception of a failed execution (trace in the emails), importance by status (high/medium/low, used by the notifierchannel_policy).channel_policyof the notifier. Recipients: configured ones (emailand/orphone), else theadmin_recipientsof the notifier.cleverage_ui_processchannel) and does not change the result of the process; notifier not enabled (framework.notifier): warning logged, nothing sent.clever_age_ui_process.notification(enabled: false,statuses: [failed, finish_with_report],channels: [],recipients: []), each key overridden by thenotificationoption of a process (next toui), resolved and validated byProcessConfigurationsManager::getNotificationOptions().symfony/notifierstays optional (require-dev+suggest): the listener is registered only when it is installed;notification.enabled: truewithout it fails when building the container.reference/09-notifications.md(new),cookbooks/notify_process_failures.md(new, Slack + email), bundle configuration, UI options, index. CHANGELOG: Add notify ability #62 entry (unreleased).Tests
NotificationTrigger,ProcessExecutionNotification,ProcessExecutionNotifier(realNotifierwith a recording channel), configuration, extension, options resolution and event dispatch.nullchatter transport): notified when enabled by the process, failed process notified, nothing by default.Checked in process-bundle-demo
cleverage/process-bundle-demo companion PR:
fakechat+logger://defaulttransport (notifications written in the logs).demo.ui.notification(logs a warning):New Chat message without specified recipient!: Process "demo.ui.notification" finished with reported logsdemo.ui.notification_failing:... Process "demo.ui.notification_failing" failednotificationoption: nothing sent.Known limits
Requirements
Breaking changes
None (new feature disabled by default; new optional constructor argument).
🤖 Generated with Claude Code