-
Notifications
You must be signed in to change notification settings - Fork 52.3k
feat(core): Add log streaming events for executions #23372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…low execution (PAY-2936) - Add 'execution-deleted' event when user deletes executions - Add 'workflow-executed' event when user manually runs or retries workflow - Emit events with user context for audit logging - Add comprehensive unit tests for both events
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 8 files
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/cli/src/executions/execution.service.ts">
<violation number="1" location="packages/cli/src/executions/execution.service.ts:335">
P2: Audit event may log empty `executionIds` when deletions occur via `deleteBefore` filter. Consider either returning deleted IDs from the repository or including `deleteBefore` in the event payload to provide a complete audit trail.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
|
E2E Tests: n8n tests passed after 8m 46.9s Run Details
Groups
This message was posted automatically by
currents.dev | Integration Settings
|
This comment has been minimized.
This comment has been minimized.
…lete audit trail When executions are deleted via date filter (deleteBefore), the executionIds array would be empty. Including deleteBefore in the event payload provides a complete audit trail showing what criteria was used for bulk deletion.
…ot set Only include deleteBefore in the payload when it has a value, rather than including deleteBefore: undefined.
Organize the workflow-executed event listener and handler alongside other workflow events for better code organization.
Summary
Adds two new log streaming events for audit logging:
n8n.audit.user.execution.deleted: Emitted when user deletes executionsn8n.audit.user.workflow.executed: Emitted when user manually runs or retries a workflowBoth events include user context for audit tracking.
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/PAY-2936
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)