Commit Graph

119 Commits

Author SHA1 Message Date
Iván Ovejero
1608d2527b refactor(core): Port endpoints config (no-changelog) (#10268) 2024-07-31 17:45:11 +02:00
Iván Ovejero
99dc56c7a1 refactor(core): Make instance role clearer (no-changelog) (#10188) 2024-07-30 10:20:21 +02:00
Iván Ovejero
7a30d845e9 refactor(core): Port path, host, port, listen_address and protocol config (no-changelog) (#10223) 2024-07-29 14:32:20 +02:00
Iván Ovejero
b81f0bf9ea refactor(core): Port workflows config (no-changelog) (#10173) 2024-07-24 14:38:29 +02:00
Iván Ovejero
66c49bb6a1 refactor(core): Port external storage config (no-changelog) (#10169) 2024-07-24 13:08:20 +02:00
Iván Ovejero
95b85dd5c1 refactor(core): Port nodes config (no-changelog) (#10140)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2024-07-23 13:32:50 +02:00
Iván Ovejero
9ab29f2181 refactor(core): Port event bus config (no-changelog) (#10111) 2024-07-19 13:25:44 +02:00
Iván Ovejero
1f420e0bd6 refactor(core): Port external secrets config (no-changelog) (#10094) 2024-07-18 10:52:41 +02:00
Iván Ovejero
14b12f844d refactor(core): Port version notifications config (no-changelog) (#10087) 2024-07-17 19:11:46 +02:00
Iván Ovejero
8a53d6127e refactor(core): Port Public API config (no-changelog) (#10082) 2024-07-17 15:36:40 +02:00
कारतोफ्फेलस्क्रिप्ट™
c7d4b471c4 refactor(core): Move backend config to a separate package (no-changelog) (#9325) 2024-07-05 11:43:27 +02:00
कारतोफ्फेलस्क्रिप्ट™
9e92a5774e refactor(core): Remove Onboarding call prompts (no-changelog) (#9933) 2024-07-04 13:51:26 +02:00
कारतोफ्फेलस्क्रिप्ट™
86018aa6e0 refactor(core): Remove Ask AI HTTP request feature (no-changelog) (#9931) 2024-07-04 12:09:45 +02:00
Iván Ovejero
7b396e78c6 refactor(core): Introduce RedisClientService (no-changelog) (#9774) 2024-06-20 12:55:07 +02:00
Iván Ovejero
c58621ab79 feat(core): Expand crash recovery to cover queue mode (#9676) 2024-06-18 15:22:02 +02:00
Iván Ovejero
797342343f perf(core): Introduce concurrency control for main mode (#9453) 2024-06-12 15:05:43 +02:00
कारतोफ्फेलस्क्रिप्ट™
0d7358807b fix(core): Add an option to disable STARTTLS for SMTP connections (#9415) 2024-05-16 10:45:58 +02:00
Alex Grozav
cd9bc44bdd feat: Add Ask AI to HTTP Request Node (#8917) 2024-05-02 13:52:15 +03:00
Iván Ovejero
2917d04766 refactor(core)!: Switch default Postgres user from root to postgres (#9248) 2024-04-29 14:19:19 +02:00
कारतोफ्फेलस्क्रिप्ट™
1b199c08ce fix(core): Add an option to add additional non-ui routes (no-changelog) (#9122) 2024-04-11 12:20:29 +02:00
कारतोफ्फेलस्क्रिप्ट™
76b73a27a0 refactor(core): Delete all auth exclusion config and checks (no-changelog) (#9044) 2024-04-03 16:56:36 +02:00
कारतोफ्फेलस्क्रिप्ट™
c4c319d7cf feat(core): Add support for SQLite connection pooling (#8722) 2024-03-14 13:45:16 +01:00
Alex Grozav
948c383999 feat: Add AI Error Debugging using OpenAI (#8805) 2024-03-13 16:48:00 +02:00
कारतोफ्फेलस्क्रिप्ट™
0818824a72 feat(core)!: Set the secure flag on issued cookies (#8812) 2024-03-05 18:57:41 +01:00
कारतोफ्फेलस्क्रिप्ट™
a2a3ca160f fix(core): Improve the startup error when EXECUTIONS_PROCESS is set (#8630)
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2024-02-14 15:35:42 +01:00
Danny Martini
cd8ca8412d fix(core): Give better error message if executions.process is still used in the configs (#8618) 2024-02-13 12:40:50 +00:00
कारतोफ्फेलस्क्रिप्ट™
121a55b691 feat(core): Remove own execution-process mode (#8490) 2024-01-30 12:51:40 +01:00
कारतोफ्फेलस्क्रिप्ट™
2fba0e8d58 feat(core): Upgrade Rudderstack SDK to address CVE-2023-45857 (#8368) 2024-01-26 16:58:44 +01:00
Iván Ovejero
a0a1830696 feat(core): Email recipients on resource shared (#8408) 2024-01-23 12:03:59 +01:00
Danny Martini
07e6705256 feat(core): Custom session timeout and refresh configuration (#8342) 2024-01-22 09:54:13 +01:00
Tomi Turtiainen
f31cc0743f fix: Force posthog recording to be disabled outside cloud (#8374) 2024-01-18 14:44:27 +02:00
Omar Ajoue
e1acb5911a refactor: Make execution IDs mandatory in BE (#8299)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2024-01-16 09:53:17 +00:00
Iván Ovejero
f53c482939 perf(core): Improve caching service (#8213)
Story: https://linear.app/n8n/issue/PAY-1188

- Implement Redis hashes on the caching service, based on Micha's work
in #7747, adapted from `node-cache-manager-ioredis-yet`. Optimize
workflow ownership lookups and manual webhook lookups with Redis hashes.
- Simplify the caching service by removing all currently unused methods
and options: `enable`, `disable`, `getCache`, `keys`, `keyValues`,
`refreshFunctionEach`, `refreshFunctionMany`, `refreshTtl`, etc.
- Remove the flag `N8N_CACHE_ENABLED`. Currently some features on
`master` are broken with caching disabled, and test webhooks now rely
entirely on caching, for multi-main setup support. We originally
introduced this flag to protect against excessive memory usage, but
total cache usage is low enough that we decided to drop this setting.
Apparently this flag was also never documented.
- Overall caching service refactor: use generics, reduce branching, add
discriminants for cache kinds for better type safety, type caching
events, improve readability, remove outdated docs, etc. Also refactor
and expand caching service tests.

Follow-up to: https://github.com/n8n-io/n8n/pull/8176

---------

Co-authored-by: Michael Auerswald <michael.auerswald@gmail.com>
2024-01-05 11:52:44 +01:00
Tomi Turtiainen
614f488386 feat(core): Add N8N_GRACEFUL_SHUTDOWN_TIMEOUT env var (#8068)
Add generic N8N_GRACEFUL_SHUTDOWN_TIMEOUT which controls how long n8n
process will wait for graceful exit before exitting forcefully. This
variables replaces the QUEUE_WORKER_TIMEOUT variable that was used for
worker process.

DEPRECATED: QUEUE_WORKER_TIMEOUT deprected

QUEUE_WORKER_TIMEOUT environment variable has been replaced with
N8N_GRACEFUL_SHUTDOWN_TIMEOUT.
2023-12-18 14:04:19 +02:00
Tomi Turtiainen
4cae976a3b fix(core): Consider timeout in shutdown an error (#8050)
If the process doesn't shutdown within a time limit, exit with error
code.

1. conceptually something timing out is an error.
2. on successful exit we close down the DB connection gracefully. On an
exit timeout we rather not do that, since it will wait for any active
connections to close and would possible block the exit.
2023-12-18 10:53:34 +02:00
Jon
439a22d68f feat: Add config option to prefer GET request over LIST when using Hashicorp Vault (#8049)
## Summary
Hashicorp Vault prefers a `LIST` HTTP method to be used when fetching
secrets but not all environments will allow custom http methods through
WAFs. This PR adds `N8N_EXTERNAL_SECRETS_PREFER_GET` which when set to
`true` will use GET instead of LIST to fetch secrets.


## Review / Merge checklist
- [x] 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))
2023-12-15 16:20:39 +00:00
Michael Kret
953a58f18b feat(n8n Form Trigger Node): Improvements (#7571)
Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
Co-authored-by: Giulio Andreini <andreini@netseven.it>
2023-12-13 17:00:51 +02:00
Jon
b6c1c04b54 feat: Add config option for external secret update interval (#7995)
## Summary
Adds `N8N_EXTERNAL_SECRETS_UPDATE_INTERVAL` to allow enterprise users to
tweak the update internal for importing new secrets.

If using a config file the value is:

```
"externalSecrets": {
  "updateInterval": 300
}
```

#### How to test the change:
1. Run as normal and check that the secret is updated every 5 minutes
2. Set `N8N_EXTERNAL_SECRETS_UPDATE_INTERVAL` to 10
3. Check the secret is reloaded after 10 seconds


## Review / Merge checklist
- [x] 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))
- [x] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
2023-12-12 14:22:14 +00:00
कारतोफ्फेलस्क्रिप्ट™
9b4856e7de feat(core): Make postgres pool-size configurable (no-changelog) (#7772)
When we upgrade typeorm in #5151, we switched from no pooling to a
default pool-size of 10. This somehow significantly deteriorates the
performance of queries when the application is under load.
2023-11-21 18:13:08 +01:00
Iván Ovejero
4c4082503c feat(core): Coordinate manual workflow activation and deactivation in multi-main scenario (#7643)
Followup to #7566 | Story: https://linear.app/n8n/issue/PAY-926

### Manual workflow activation and deactivation

In a multi-main scenario, if the user manually activates or deactivates
a workflow, the process (whether leader or follower) that handles the
PATCH request and updates its internal state should send a message into
the command channel, so that all other main processes update their
internal state accordingly:

- Add to `ActiveWorkflows` if activating
- Remove from `ActiveWorkflows` if deactivating
- Remove and re-add to `ActiveWorkflows` if the update did not change
activation status.

After updating their internal state, if activating or deactivating, the
recipient main processes should push a message to all connected
frontends so that these can update their stores and so reflect the value
in the UI.

### Workflow activation errors

On failure to activate a workflow, the main instance should record the
error in Redis - main instances should always pull activation errors
from Redis in a multi-main scenario.

### Leadership change

On leadership change...

- The old leader should stop pruning and the new leader should start
pruning.
- The old leader should remove trigger- and poller-based workflows and
the new leader should add them.
2023-11-17 15:58:50 +01:00
Ricardo Espinoza
5790e251b8 feat(core): Rate limit forgot password endpoint (#7604)
Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
2023-11-03 13:44:12 -04:00
Iván Ovejero
442c73e63b feat(core): Set up leader selection for multiple main instances (#7527)
https://linear.app/n8n/issue/PAY-933/set-up-leader-selection-for-multiple-main-instances

- [x] Set up new envs
- [x] Add config and license checks
- [x] Implement `MultiMainInstancePublisher`
- [x] Expand `RedisServicePubSubPublisher` to support
`MultiMainInstancePublisher`
- [x] Init `MultiMainInstancePublisher` on startup and destroy on
shutdown
- [x] Add to sandbox plans
- [x] Test manually

Note: This is only for setup - coordinating in reaction to leadership
changes will come in later PRs.
2023-10-30 16:22:32 +01:00
Iván Ovejero
233683ce1a refactor(core): Remove webhook deregistration on shutdown flag (#7543)
Removal missing from [original
PR](https://github.com/n8n-io/n8n/pull/7515) after initial revert.
2023-10-27 18:48:21 +02:00
Omar Ajoue
3d95b243e9 feat(core): Make queue mode settings configurable (#7526)
This PR allows users to configure the settings to Bull, possibly
reducing the errors with `maxStalledCount` and other issues, that
usually happen either when a worker crashes or when the event loop is
super busy. Increasing the lease time and the `maxStalledCount` settings
might improve UX.

Github issue / Community forum post (link here to close automatically):
2023-10-26 17:30:16 +02:00
Iván Ovejero
5477e3fb45 refactor(core): Move execution save settings into lifecycle function (no-changelog) (#7370)
Move the handling of execution save settings into a tested lifecycle
function as discussed with Omar
2023-10-26 14:35:38 +02:00
कारतोफ्फेलस्क्रिप्ट™
05586a900d refactor(core): Make Logger a service (no-changelog) (#7494) 2023-10-25 16:35:22 +02:00
कारतोफ्फेलस्क्रिप्ट™
b6de910cbe refactor(core): Abstract away InstanceSettings and encryptionKey into injectable services (no-changelog) (#7471)
This change ensures that things like `encryptionKey` and `instanceId`
are always available directly where they are needed, instead of passing
them around throughout the code.
2023-10-23 13:39:35 +02:00
Jon
647372be27 feat(core): Add support for oauth based service accounts with UM SMTP (#7311)
This PR adds support for using OAuth based service accounts for the User
Management SMTP connection.

Tested using a Google Service Account.
2023-10-20 11:36:40 +01:00
Iván Ovejero
b50376cf52 refactor(core): Make executions pruning settings configurable (#7468) 2023-10-19 16:57:12 +02:00
Iván Ovejero
40707fa692 feat(core): Make executions pruning interval configurable (#7439) 2023-10-18 17:01:57 +02:00