n8n/packages/cli/src
Omar Ajoue 5ffff1bb22
fix: Stop binary data restoration from preventing execution from finishing (#8082)
In the case of a filesystem failure to rename the binary files as part
of the execution's cleanup process, the execution would fail to be saved
and would never finish. This catch prevents it.

## Summary
Whenever an execution is wrapping u to save the data, if it uses binary
data n8n will try to find possibly misallocated files and place them in
the right folder. If this process fails, the execution fails to finish.

Given the execution has already finished at this point, and we cannot
handle the binary data errors more gracefully, all we can do at this
point is log the message as it's a filesystem issue. The rest of the
execution saving process should remain as normal.



## Related tickets and issues
https://linear.app/n8n/issue/HELP-430



## Review / Merge checklist
- [ ] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [ ] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again.
   > A feature is not complete without tests.

---------

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2023-12-21 09:40:39 +00:00
..
auth refactor(core): Introduce password utility (no-changelog) (#7979) 2023-12-11 18:23:42 +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 ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
config feat(core): Add N8N_GRACEFUL_SHUTDOWN_TIMEOUT env var (#8068) 2023-12-18 14:04:19 +02:00
controllers ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
credentials ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
databases ci: Fix Postgres and MySQL tests (no-changelog) (#8106) 2023-12-20 15:14:31 +01:00
decorators ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
environments refactor(core): Move instance owner retrieval to ownership service (no-changelog) (#7980) 2023-12-11 13:35:09 +01:00
errors refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
eventbus fix: Upgrade axios to address CVE-2023-45857 (#7713) 2023-12-19 16:17:01 +01:00
executionLifecycleHooks fix: Stop binary data restoration from preventing execution from finishing (#8082) 2023-12-21 09:40:39 +00:00
executions ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
ExternalSecrets fix: Upgrade axios to address CVE-2023-45857 (#7713) 2023-12-19 16:17:01 +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 refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
license refactor(core): Move license endpoints to a decorated controller class (no-changelog) (#8074) 2023-12-19 12:13:19 +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(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
permissions feat(editor): Finalize workers view (#8052) 2023-12-20 17:49:14 +01:00
posthog refactor: Run lintfix (no-changelog) (#7537) 2023-10-27 14:15:02 +02:00
PublicApi fix(core): Public API support node's deprecated continueOnFail to upload old workflows (no-changelog) (#8044) 2023-12-15 16:11:53 +01:00
push feat(core): Update LLM applications building support (no-changelog) (#7710) 2023-11-28 16:47:28 +01:00
security-audit fix(core): Use relative imports for dynamic imports in SecurityAuditService (#8086) 2023-12-19 12:41:15 +01:00
services feat(n8n Form Trigger Node): Improvements (#7571) 2023-12-13 17:00:51 +02:00
sso refactor(core): Introduce password utility (no-changelog) (#7979) 2023-12-11 18:23:42 +01:00
telemetry fix(core): Downgrade Rudderstack SDK (no-changelog) (#8107) 2023-12-20 11:59:44 +01:00
types refactor: Move CLI commands types to own dir (no-changelog) (#6658) 2023-07-13 10:10:08 +02:00
UserManagement ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
workflows refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
AbstractServer.ts feat(n8n Form Trigger Node): Improvements (#7571) 2023-12-13 17:00:51 +02: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 refactor(core): Don't use DB transactions on ExecutionRepository.createNewExecution (#8002) 2023-12-12 14:36:56 +01:00
ActiveWorkflowRunner.ts refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
constants.ts refactor(core): Introduce password utility (no-changelog) (#7979) 2023-12-11 18:23:42 +01:00
CrashJournal.ts refactor(core): Make Logger a service (no-changelog) (#7494) 2023-10-25 16:35:22 +02:00
CredentialsHelper.ts ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
CredentialsOverwrites.ts refactor(core): Make Logger a service (no-changelog) (#7494) 2023-10-25 16:35:22 +02:00
CredentialTypes.ts refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +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 refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
ErrorReporting.ts refactor(core): Update backend sentry setup to reduce noise (no-changelog) (#8026) 2023-12-18 14:26:07 +01:00
ExpressionEvaluator.ts fix(core): Fix expression evaluator filename typo (no-changelog) (#7960) 2023-12-07 17:50:49 +01:00
ExternalHooks.ts refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
GenericHelpers.ts refactor(core): Introduce naming service (no-changelog) (#7985) 2023-12-11 12:35:14 +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 refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
InternalHooks.ts refactor(core): Add telemetry for RBAC roles (#7969) 2023-12-13 12:22:11 +01:00
jest.d.ts feat(core): Security audit (#5034) 2023-01-05 13:28:40 +01:00
License.ts feat(core): Set up endpoint for all existing roles with license flag (#7834) 2023-11-28 14:16:47 +01:00
LoadNodesAndCredentials.ts refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +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): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
Queue.ts refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
requests.ts fix(core): Consolidate ownership and sharing data on workflows and credentials (#7920) 2023-12-05 10:11:18 +01:00
ResponseHelper.ts feat(n8n Form Trigger Node): Improvements (#7571) 2023-12-13 17:00:51 +02:00
SecretsHelpers.ts feat: External Secrets storage for credentials (#6477) 2023-08-25 10:33:46 +02:00
Server.ts fix(core): Do not display error when stopping jobless execution in queue mode (#8007) 2023-12-19 16:11:21 +01: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 refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
utils.ts refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
WaitingForms.ts feat(n8n Form Trigger Node): Improvements (#7571) 2023-12-13 17:00:51 +02:00
WaitingWebhooks.ts feat(n8n Form Trigger Node): Improvements (#7571) 2023-12-13 17:00:51 +02:00
WaitTracker.ts refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
WebhookHelpers.ts refactor(core): Make workflow services injectable (no-changelog) (#8033) 2023-12-15 12:59:56 +01:00
WebhookServer.ts feat(core): Add unique id to instances (#6863) 2023-08-07 17:03:21 +02:00
WorkflowCredentials.ts refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
WorkflowExecuteAdditionalData.ts refactor(core): Make workflow services injectable (no-changelog) (#8033) 2023-12-15 12:59:56 +01:00
WorkflowHelpers.ts ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
WorkflowRunner.ts fix: Ensure external hooks post workflow execute run in queue mode (#7947) 2023-12-07 10:00:05 +00: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