-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
feat(core): Workflow Execution Statistics #4200
Conversation
…execution-statistics
Should allow for tests to run on PR
…execution-statistics
…execution-statistics
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.
Hey @freyamade I've left a couple comments with suggestions.
Also I had the above issue when starting n8n. I can help you debug if you need, LMK.
packages/cli/src/databases/migrations/postgresdb/1664196174001-WorkflowStatistics.ts
Outdated
Show resolved
Hide resolved
…execution-statistics
…execution-statistics
…n-io/n8n into feature/workflow-execution-statistics
}); | ||
|
||
// Helper function that validates the ID, throws an error if not valud | ||
async function checkWorkflowId(workflowId: string, user: User): Promise<WorkflowEntity> { |
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.
This check could be transformed to become a middleware since all endpoints in this controller follow the same logic. Also this can be simplified by running a single check to the SharedWorkflows
table similar to what's done in the workflows.controller.ts
as below:
const shared = await Db.collections.SharedWorkflow.findOne({
relations,
where: whereClause({
user: req.user,
entityType: 'workflow',
entityId: workflowId,
roles: ['owner'],
}),
});
if (!shared) {
LoggerProxy.info('User attempted to access a workflow without permissions', {
workflowId,
userId: req.user.id,
});
throw new ResponseHelper.NotFoundError(
'Could not load the workflow - you can only access workflows owned by you',
);
}
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.
I was trying that but for some reason I was running into a weird issue, something along the lines of column entityType does not exist
if I remember right 🤔
…execution-statistics
…n-io/n8n into feature/workflow-execution-statistics
…n-io/n8n into feature/workflow-execution-statistics
Got released with |
No description provided.