-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(notifs): inactivity polling filters, consolidate trigger types, minor consistency issue with filter parsing #2452
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryConsolidated trigger type definitions by introducing
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant WF as Workflow Execution
participant EE as Event Emitter
participant DB as Database
participant AR as Alert Rules
participant IP as Inactivity Polling
participant ND as Notification Delivery
Note over WF,ND: Workflow Execution Flow
WF->>EE: emitWorkflowExecutionCompleted(log)
EE->>DB: Query subscriptions for workspace
DB-->>EE: Return active subscriptions
loop For each subscription
EE->>EE: Check levelFilter.includes(log.level)
EE->>EE: Check triggerFilter.includes(log.trigger)
alt Filters match
EE->>AR: shouldTriggerAlert(config, context, lastAlertAt)
AR->>DB: Query logs with triggerFilter
Note over AR,DB: Queries now filtered by trigger types:<br/>consecutive_failures, failure_rate,<br/>latency_spike, error_count
DB-->>AR: Historical execution data
AR-->>EE: Alert decision
alt Should alert
EE->>DB: Update lastAlertAt
EE->>ND: Create notification delivery
end
end
end
Note over IP,ND: Inactivity Polling (Hourly)
IP->>DB: Query no_activity subscriptions
DB-->>IP: Return subscriptions
loop For each subscription
IP->>IP: Validate triggerFilter exists
IP->>DB: Get workflows with active deployments
DB-->>IP: Deployed workflows with state
IP->>IP: deploymentHasTriggerType(state, triggerFilter)
Note over IP: Filters workflows by checking if<br/>deployment has matching trigger blocks
IP->>DB: Query recent logs with triggerFilter
DB-->>IP: Recent execution logs
alt No activity in window
IP->>DB: Update lastAlertAt
IP->>ND: Create notification delivery
end
end
|
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.
Additional Comments (1)
-
apps/sim/lib/notifications/inactivity-polling.ts, line 112-113 (link)logic:
triggerFilterandlevelFiltercould be null, causinginArrayto fail
7 files reviewed, 1 comment
Summary
Type of Change
Testing
Tested manually with @aadamgough
Checklist