n8n/packages/cli/test/unit
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
..
collaboration feat(editor): Show avatars for users currently working on the same workflow (#7763) 2023-11-23 10:14:34 +01:00
controllers refactor(core): Introduce password utility (no-changelog) (#7979) 2023-12-11 18:23:42 +01:00
databases/utils fix(editor): Validate user info before submiting (#7608) 2023-11-22 12:14:44 +01:00
execution-lifecyle fix: Stop binary data restoration from preventing execution from finishing (#8082) 2023-12-21 09:40:39 +00:00
ExternalSecrets ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
license refactor(core): Move license endpoints to a decorated controller class (no-changelog) (#8074) 2023-12-19 12:13:19 +01:00
middleware refactor(core): Make Logger a service (no-changelog) (#7494) 2023-10-25 16:35:22 +02:00
push ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
repositories ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076) 2023-12-19 13:52:42 +01:00
services fix(core): Prevent workflow history saving error from happening (#7812) 2023-12-13 11:41:06 +00:00
shared fix(core): Prevent workflow history saving error from happening (#7812) 2023-12-13 11:41:06 +00:00
utilities refactor(core): Introduce password utility (no-changelog) (#7979) 2023-12-11 18:23:42 +01:00
ActiveExecutions.test.ts refactor(core): Don't use DB transactions on ExecutionRepository.createNewExecution (#8002) 2023-12-12 14:36:56 +01:00
CredentialsHelper.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
CredentialTypes.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
CurlConverterHelper.test.ts ci: Expand ESLint to tests in BE packages (no-changelog) (#6147) 2023-05-02 10:37:19 +02:00
Helpers.ts ci: Expand ESLint to tests in BE packages (no-changelog) (#6147) 2023-05-02 10:37:19 +02:00
InternalHooks.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
License.test.ts refactor(core): Move license endpoints to a decorated controller class (no-changelog) (#8074) 2023-12-19 12:13:19 +01:00
PermissionChecker.test.ts test(core): Improve tests for subworkflow caller policy checks (no-changelog) (#7954) 2023-12-08 11:21:43 +01:00
PostHog.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
SourceControl.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
Telemetry.test.ts refactor(core): Move license endpoints to a decorated controller class (no-changelog) (#8074) 2023-12-19 12:13:19 +01:00
TestWebhooks.test.ts refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
UserManagementMailer.test.ts fix(core): Do not return inviteAcceptUrl in response if email was sent (#7465) 2023-10-19 13:58:06 +02:00
utils.test.ts refactor(core): Improve test-webhooks (no-changelog) (#8069) 2023-12-19 17:32:02 +01:00
WebhookHelpers.test.ts feat(core): Add Support for custom CORS origins for webhooks (#7455) 2023-11-22 17:49:56 +01:00
webhooks.test.ts feat(n8n Form Trigger Node): Improvements (#7571) 2023-12-13 17:00:51 +02:00
WorkflowCredentials.test.ts refactor(core): Switch plain errors in cli to ApplicationError (#7857) 2023-11-29 12:25:10 +01:00
WorkflowExecuteAdditionalData.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
WorkflowHelpers.test.ts fix(core): Prevent workflow history saving error from happening (#7812) 2023-12-13 11:41:06 +00:00
workflowHistoryHelper.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
WorkflowRunner.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00