n8n/packages/cli/src
Omar Ajoue 847f6ac771
fix(core): Prevent error messages due to statistics about data loading (#7824)
Statistics collection about the first time a workflow loads data simply
attempts an insert to db, and if it fails, we just ignore.

This was causing this query to fire against production workflows
multiple times, and since we want to insert only and detect whether the
insertion failed, performing a select first provides gains both in terms
of performance, as it's usually faster than trying an insertion as well
as preventing unnecessary noise in logs.

Github issue / Community forum post (link here to close automatically):

https://community.n8n.io/t/duplicate-key-value-violates-unique-constraint-workflow-statistics-pkey-still-happening/29283
https://github.com/n8n-io/n8n/issues/7256
https://community.n8n.io/t/error-log-arriving-in-postgres/30191
https://github.com/n8n-io/n8n/issues/7256

https://community.n8n.io/t/cant-launch-webhooks-unable-to-find-data-of-execution/31867

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-11-27 15:43:48 +01:00
..
auth fix(core): Initialize JWT Secret before it's used anywhere (#7707) 2023-11-15 12:17:18 +01:00
collaboration feat(editor): Show avatars for users currently working on the same workflow (#7763) 2023-11-23 10:14:34 +01:00
commands build: Upgrade lint related packages (#7790) 2023-11-27 09:11:52 +01:00
config build: Upgrade to Vite 5 (#7784) 2023-11-23 11:55:02 +01:00
controllers feat(core): Allow user role modification (#7797) 2023-11-24 11:40:08 +01:00
credentials ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
databases fix(core): Prevent error messages due to statistics about data loading (#7824) 2023-11-27 15:43:48 +01:00
decorators feat: Add Licensed decorator (no-changelog) (#7828) 2023-11-27 13:46:18 +00:00
environments feat: Add Licensed decorator (no-changelog) (#7828) 2023-11-27 13:46:18 +00:00
eventbus build: Upgrade lint related packages (#7790) 2023-11-27 09:11:52 +01:00
executionLifecycleHooks refactor(core): Move execution progress saving to standalone utility (no-changelog) (#7770) 2023-11-27 13:10:43 +01:00
executions ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
ExternalSecrets feat(core): Coordinate manual workflow activation and deactivation in multi-main scenario (#7643) 2023-11-17 15:58:50 +01:00
helpers fix(core): Add check that queue is defined and remove cyclic dependency (#7404) 2023-10-13 11:53:59 +02:00
Ldap ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
license ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
Mfa ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
middlewares refactor: Extract Invitation routes to InvitationController (no-changelog) (#7726) 2023-11-16 12:39:43 -05:00
permissions feat: Add scopes to /login endpoint (no-changelog) (#7718) 2023-11-16 11:11:55 +00:00
posthog refactor: Run lintfix (no-changelog) (#7537) 2023-10-27 14:15:02 +02:00
PublicApi perf(core): Lazyload security audit reporters (#7696) 2023-11-13 11:50:43 +01:00
push build: Upgrade lint related packages (#7790) 2023-11-27 09:11:52 +01:00
security-audit perf(core): Lazyload security audit reporters (#7696) 2023-11-13 11:50:43 +01:00
services fix(core): Prevent error messages due to statistics about data loading (#7824) 2023-11-27 15:43:48 +01:00
sso ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
telemetry refactor: Run lintfix (no-changelog) (#7537) 2023-10-27 14:15:02 +02:00
types refactor: Move CLI commands types to own dir (no-changelog) (#6658) 2023-07-13 10:10:08 +02:00
UserManagement refactor(core): Stop reporting to Sentry unknown cred on mapping (no-changelog) (#7752) 2023-11-17 16:17:44 +01:00
workflows fix(core): Tighten checks for multi-main setup usage (#7788) 2023-11-23 12:18:39 +01:00
AbstractServer.ts build: Upgrade lint related packages (#7790) 2023-11-27 09:11:52 +01:00
ActivationErrors.service.ts feat(core): Coordinate manual workflow activation and deactivation in multi-main scenario (#7643) 2023-11-17 15:58:50 +01:00
ActiveExecutions.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
ActiveWebhooks.ts refactor(core): Reorganize error hierarchy in core and workflow packages (no-changelog) (#7820) 2023-11-27 15:33:21 +01:00
ActiveWorkflowRunner.ts refactor(core): Reorganize error hierarchy in core and workflow packages (no-changelog) (#7820) 2023-11-27 15:33:21 +01:00
constants.ts feat(editor): Adds a EE view to show worker details and job status (#7600) 2023-11-10 23:48:31 +01:00
CrashJournal.ts refactor(core): Make Logger a service (no-changelog) (#7494) 2023-10-25 16:35:22 +02:00
CredentialsHelper.ts feat(editor): Add HTTP request nodes for credentials without a node (#7157) 2023-11-13 12:11:16 +01:00
CredentialsOverwrites.ts refactor(core): Make Logger a service (no-changelog) (#7494) 2023-10-25 16:35:22 +02:00
CredentialTypes.ts feat(editor): Add HTTP request nodes for credentials without a node (#7157) 2023-11-13 12:11:16 +01:00
curlconverter.d.ts refactor: Clear unused ESLint directives from BE packages (no-changelog) (#6798) 2023-07-31 11:00:48 +02:00
CurlConverterHelper.ts refactor: Clear unused ESLint directives from BE packages (no-changelog) (#6798) 2023-07-31 11:00:48 +02:00
Db.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
ErrorReporting.ts refactor(core): Reorganize error hierarchy in core and workflow packages (no-changelog) (#7820) 2023-11-27 15:33:21 +01:00
ExpressionEvalator.ts feat(core): Add Tournament as the new default expression evaluator (#6964) 2023-09-21 13:57:45 +01:00
ExternalHooks.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
GenericHelpers.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
index.ts ci: Refactor cli tests to speed up CI (no-changelog) (#5718) 2023-03-17 17:24:05 +01:00
Interfaces.ts feat(core): Add Support for custom CORS origins for webhooks (#7455) 2023-11-22 17:49:56 +01:00
InternalHooks.ts fix(core): Prevent executions from becoming forever running (#7569) 2023-11-01 13:51:13 +01:00
jest.d.ts feat(core): Security audit (#5034) 2023-01-05 13:28:40 +01:00
License.ts fix(core): Tighten checks for multi-main setup usage (#7788) 2023-11-23 12:18:39 +01:00
LoadNodesAndCredentials.ts feat(editor): Add HTTP request nodes for credentials without a node (#7157) 2023-11-13 12:11:16 +01:00
Logger.ts ci: Stop disabling linting rules that are explicitly set to warn (no-changelog) (#7669) 2023-11-09 14:05:39 +01:00
NodeTypes.ts refactor(core): Stop reporting to Sentry unrecognized node errors (no-changelog) (#7728) 2023-11-17 10:25:10 +01:00
Queue.ts refactor: Run lintfix (no-changelog) (#7537) 2023-10-27 14:15:02 +02:00
requests.ts feat(core): Allow user role modification (#7797) 2023-11-24 11:40:08 +01:00
ResponseHelper.ts ci: Stop disabling linting rules that are explicitly set to warn (no-changelog) (#7669) 2023-11-09 14:05:39 +01:00
SecretsHelpers.ts feat: External Secrets storage for credentials (#6477) 2023-08-25 10:33:46 +02:00
Server.ts refactor: Refactor variables controller into a RestController (no-changelog) (#7822) 2023-11-27 12:17:09 +00:00
sse-channel.d.ts feat(core): Add support for WebSockets as an alternative to Server-Sent Events (#5443) 2023-02-10 15:02:47 +01:00
TestWebhooks.ts feat(core): Add Support for custom CORS origins for webhooks (#7455) 2023-11-22 17:49:56 +01:00
utils.ts fix(core): Set up OAuth2 cred test (#6960) 2023-08-18 16:18:44 +02:00
WaitingWebhooks.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
WaitTracker.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
WebhookHelpers.ts feat(core): Add Support for custom CORS origins for webhooks (#7455) 2023-11-22 17:49:56 +01:00
WebhookServer.ts feat(core): Add unique id to instances (#6863) 2023-08-07 17:03:21 +02:00
WorkflowCredentials.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
WorkflowExecuteAdditionalData.ts refactor(core): Move execution progress saving to standalone utility (no-changelog) (#7770) 2023-11-27 13:10:43 +01:00
WorkflowHelpers.ts refactor: Refactor variables controller into a RestController (no-changelog) (#7822) 2023-11-27 12:17:09 +00:00
WorkflowRunner.ts fix(core): Ensure failed executions are saved in queue mode (#7744) 2023-11-20 16:03:02 +01:00
WorkflowRunnerProcess.ts ci: Stop disabling linting rules that are explicitly set to warn (no-changelog) (#7669) 2023-11-09 14:05:39 +01:00