improvement(queries): add workspaceId to execution logs, added missing indexes based on query insights#2471
Merged
waleedlatif1 merged 5 commits intostagingfrom Dec 20, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryThis PR adds Key Changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Route as API Route<br/>(execute/webhook/schedule)
participant Preprocess as Preprocessing
participant LogSession as LoggingSession
participant Logger as ExecutionLogger
participant DB as Database<br/>(workflow_execution_logs)
Client->>Route: Trigger workflow execution
Route->>Preprocess: Validate workflow access
Preprocess->>DB: Fetch workflow record
DB-->>Preprocess: workflow (with workspaceId)
Preprocess-->>Route: workflowRecord
Route->>Route: Validate workspaceId exists
alt workspaceId is null
Route-->>Client: Error: No workspace
end
Route->>LogSession: safeStart({ workspaceId, userId })
LogSession->>Logger: startWorkflowExecution({ workspaceId, workflowId, executionId })
Logger->>DB: INSERT INTO workflow_execution_logs<br/>(workspace_id, workflow_id, execution_id)
DB-->>Logger: Log entry created
Logger-->>LogSession: Log started
LogSession-->>Route: Session ready
Route->>Route: Execute workflow
Route-->>Client: Execution result
Note over DB: New composite index:<br/>workspace_id + started_at<br/>enables fast queries
|
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.
Summary
Type of Change
Testing
Tested manually
Checklist