n8n/packages/nodes-base
Iván Ovejero cd08c8e4c6
refactor(core): Implement soft-deletions for executions (#7092)
Based on #7065 | Story: https://linear.app/n8n/issue/PAY-771

n8n on filesystem mode marks binary data to delete on manual execution
deletion, on unsaved execution completion, and on every execution
pruning cycle. We later prune binary data in a separate cycle via these
marker files, based on the configured TTL. In the context of introducing
an S3 client to manage binary data, the filesystem mode's mark-and-prune
setup is too tightly coupled to the general binary data management
client interface.

This PR...
- Ensures the deletion of an execution causes the deletion of any binary
data associated to it. This does away with the need for binary data TTL
and simplifies the filesystem mode's mark-and-prune setup.
- Refactors all execution deletions (including pruning) to cause soft
deletions, hard-deletes soft-deleted executions based on the existing
pruning config, and adjusts execution endpoints to filter out
soft-deleted executions. This reduces DB load, and keeps binary data
around long enough for users to access it when building workflows with
unsaved executions.
- Moves all execution pruning work from an execution lifecycle hook to
`execution.repository.ts`. This keeps related logic in a single place.
- Removes all marking logic from the binary data manager. This
simplifies the interface that the S3 client will meet.
- Adds basic sanity-check tests to pruning logic and execution deletion.

Out of scope:

- Improving existing pruning logic.
- Improving existing execution repository logic.
- Adjusting dir structure for filesystem mode.

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-09-20 15:21:42 +02:00
..
credentials feat(Linear Node): Add support for OAuth2 (#7201) 2023-09-20 10:19:12 +01:00
nodes docs(Google Sheets Node): Operations naming update (no-changelog) (#7211) 2023-09-20 15:20:56 +02:00
scripts ci: Validate load options methods in nodes-base (no-changelog) (#5862) 2023-04-12 15:46:11 +02:00
test refactor(core): Implement soft-deletions for executions (#7092) 2023-09-20 15:21:42 +02:00
utils refactor(Spreadsheet File Node): Reduce memory usage when loading CSV files (#7095) 2023-09-06 11:58:00 +02:00
.eslintrc.js refactor: Enable cred-class-field-documentation-url-missing (no-changelog) (#6907) 2023-08-10 16:35:06 +02:00
gulpfile.js refactor: Validate formatting in nodes-base (no-changelog) (#4685) 2022-11-22 12:44:35 +01:00
index.js fix(core): Improve community nodes loading (#5608) 2023-03-24 17:04:26 +01:00
jest.config.js refactor: Consolidate tsconfig and eslintrc files (no-changelog) (#6816) 2023-08-01 17:32:43 +02:00
LICENSE.md docs: scope Sustainable Use License to contents of the main branch (#4450) 2022-10-26 16:50:33 +02:00
LICENSE_EE.md docs(license): Introduce n8n Enterprise License (#3945) 2022-08-29 22:08:42 +02:00
package.json feat(Linear Node): Add support for OAuth2 (#7201) 2023-09-20 10:19:12 +01:00
README.md docs: Add proprietary license text (no-changelog) (#6038) 2023-04-20 18:49:09 +02:00
tsconfig.build.json refactor: Consolidate tsconfig and eslintrc files (no-changelog) (#6816) 2023-08-01 17:32:43 +02:00
tsconfig.json refactor: Consolidate tsconfig and eslintrc files (no-changelog) (#6816) 2023-08-01 17:32:43 +02:00

n8n.io - Workflow Automation

n8n-nodes-base

The nodes which are included by default in n8n

npm install n8n-nodes-base -g

License

n8n is fair-code distributed under the Sustainable Use License.

Proprietary licenses are available for enterprise customers. Get in touch

Additional information about the license can be found in the docs.