Commit graph

9684 commits

Author SHA1 Message Date
Csaba Tuncsik 152883eed1
build: Upgrade lint related packages (#7790) 2023-11-27 09:11:52 +01:00
कारतोफ्फेलस्क्रिप्ट™ d2c18c5727
fix(core): Use AbortController to notify nodes to abort execution (#6141)
and add support for cancelling ongoing operations inside a node.

---------
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
2023-11-24 18:17:06 +01:00
Milorad FIlipović 0ec67dabf7
fix(editor): Fix UserStack vertical centering (no-changelog) (#7806)
Dropdown items in `UserStack`component are not properly vertically
aligned. That's particularly noticeable when the items are hovered:

![image](https://github.com/n8n-io/n8n/assets/2598782/c994be3d-45e9-4b89-9973-deee5a8735ba)
2023-11-24 16:38:11 +01:00
Iván Ovejero eec2ec1ff8
refactor(core): Consolidate path-related errors in Sentry (no-changelog) (#7757)
Keep reporting [path-related
errors](https://n8nio.sentry.io/issues/4649493725) in Sentry but
consolidate them in a single error group.

Also, add `options.extra` as `meta` so they remain visible in debug
logs:

```
2023-11-24T11:50:54.852Z | error    | ReportableError: Something went wrong "{ test: 123, file: 'LoggerProxy.js', function: 'exports.error' }"
```

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-11-24 14:42:46 +01:00
Tomi Turtiainen 5914e97e9a
docs: Document how to run e2e tests (no-changelog) (#7802) 2023-11-24 13:21:42 +02:00
Iván Ovejero 7a86d36068
feat(core): Allow user role modification (#7797)
https://linear.app/n8n/issue/PAY-985

```
PATCH /users/:id/role
  unauthenticated user
    ✓ should receive 401 (349 ms)
  member
    ✓ should fail to demote owner to member (349 ms)
    ✓ should fail to demote owner to admin (359 ms)
    ✓ should fail to demote admin to member (381 ms)
    ✓ should fail to promote other member to owner (353 ms)
    ✓ should fail to promote other member to admin (377 ms)
    ✓ should fail to promote self to admin (354 ms)
    ✓ should fail to promote self to owner (371 ms)
  admin
    ✓ should receive 400 on invalid payload (351 ms)
    ✓ should receive 404 on unknown target user (351 ms)
    ✓ should fail to demote owner to admin (349 ms)
    ✓ should fail to demote owner to member (347 ms)
    ✓ should fail to promote member to owner (384 ms)
    ✓ should fail to promote admin to owner (350 ms)
    ✓ should be able to demote admin to member (354 ms)
    ✓ should be able to demote self to member (350 ms)
    ✓ should be able to promote member to admin (349 ms)
  owner
    ✓ should be able to promote member to admin (349 ms)
    ✓ should be able to demote admin to member (349 ms)
    ✓ should fail to demote self to admin (348 ms)
    ✓ should fail to demote self to member (354 ms)
```
2023-11-24 11:40:08 +01:00
Tomi Turtiainen 87fa3c2985
test: Remove obsolete snapshot (#7803)
Fixes

```
  Snapshots  1 obsolete
             ↳ src/components/banners/__tests__/V1Banner.spec.ts
               · V1 Banner > should render banner if user is not woner 1
```
2023-11-24 11:53:28 +02:00
Elias Meire da851986f6
feat(editor): Add node name and version to NDV node settings (#7731)
<img width="580" alt="image"
src="https://github.com/n8n-io/n8n/assets/8850410/85ac1c6e-9116-436a-a2ed-8d0ac162a287">

<img width="580" alt="image"
src="https://github.com/n8n-io/n8n/assets/8850410/08b37377-cef5-4f80-80c0-addfdd37f728">

---------

Co-authored-by: Giulio Andreini <andreini@netseven.it>
2023-11-23 18:28:07 +01:00
Elias Meire 902beffce5
fix(editor): Disable context menu actions in read-only mode (#7789)
Github issue / Community forum post (link here to close automatically):
2023-11-23 17:10:45 +01:00
Val 865192adf0
feat: Add global admin role (no-changelog) (#7781)
Github issue / Community forum post (link here to close automatically):
2023-11-23 13:38:11 +00:00
Michael Auerswald 5835e055d3
fix(editor): Show nice error when environment is not set up (#7778)
Adds a nicer error message with a link for owners who press Push to Git
without having a repository connected yet.
2023-11-23 13:50:03 +01:00
Alex Grozav 67a88914f2
feat(editor): Add routing middleware, permission checks, RBAC store, RBAC component (#7702)
Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: Csaba Tuncsik <csaba@n8n.io>
2023-11-23 13:22:47 +02:00
Iván Ovejero fdb2c18ecc
fix(core): Tighten checks for multi-main setup usage (#7788)
https://n8nio.slack.com/archives/C05HRPLSGTT/p1700731476321999?thread_ts=1700729359.746899&cid=C05HRPLSGTT
2023-11-23 12:18:39 +01:00
Marcus 6208af07eb
fix(HTTP Request Node): Enable expressions for binary input data fields (#7782)
Github issue / Community forum post (link here to close automatically):
https://github.com/n8n-io/n8n/issues/7775
2023-11-23 11:58:50 +01:00
Csaba Tuncsik e128b23a2b
build: Upgrade to Vite 5 (#7784) 2023-11-23 11:55:02 +01:00
Milorad FIlipović 77bc8ecd4b
feat(editor): Show avatars for users currently working on the same workflow (#7763)
This PR introduces the following changes:
- New Vue stores: `collaborationStore` and `pushConnectionStore`
- Front-end push connection handling overhaul: Keep only a singe
connection open and handle it from the new store
- Add user avatars in the editor header when there are multiple users
working on the same workflow
- Sending a heartbeat event to back-end service periodically to confirm
user is still active

- Back-end overhauls (authored by @tomi):
  - Implementing a cleanup procedure that removes inactive users
  - Refactoring collaboration service current implementation

---------

Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
2023-11-23 10:14:34 +01:00
Michael Kret 99a9ea497a
feat(core): Add Support for custom CORS origins for webhooks (#7455)
node-850
https://community.n8n.io/t/add-ability-to-set-cors-allow-list-in-n8n-webhooks/7610
https://community.n8n.io/t/configure-cors-pre-flight-request-option-method-in-the-roadmap/32189

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-11-22 17:49:56 +01:00
कारतोफ्फेलस्क्रिप्ट™ 96fd2c51bd
fix(core): Show webhook urls for all webhook nodes (no-changelog) (#7783)
This reverts parts of https://github.com/n8n-io/n8n/pull/7113
2023-11-22 17:45:26 +01:00
Csaba Tuncsik 50f568560f
perf: Make frontend linting faster (no-changelog) (#7717)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-11-22 15:01:22 +01:00
github-actions[bot] e01617ad64
🚀 Release 1.18.0 (#7780)
#
[1.18.0](https://github.com/n8n-io/n8n/compare/n8n@1.17.0...n8n@1.18.0)
(2023-11-22)


### Bug Fixes

* **core:** Account for non-ASCII chars in filename on binary data
download ([#7742](https://github.com/n8n-io/n8n/issues/7742))
([b4ebb1a](b4ebb1a28d))
* **core:** Correct permissions for getstatus
([#7724](https://github.com/n8n-io/n8n/issues/7724))
([f96c1d2](f96c1d2044))
* **core:** Ensure failed executions are saved in queue mode
([#7744](https://github.com/n8n-io/n8n/issues/7744))
([b7c5c74](b7c5c7406f))
* **core:** Guard against node not found on cancelling test webhook
([#7750](https://github.com/n8n-io/n8n/issues/7750))
([6be453b](6be453b716))
* **editor:** Handle permission edge cases (empty scopes)
([#7723](https://github.com/n8n-io/n8n/issues/7723))
([e2ffd39](e2ffd397fc))
* **editor:** Make sure LineController is registered with chart.js
([#7730](https://github.com/n8n-io/n8n/issues/7730))
([ebee1a5](ebee1a5908))
* **editor:** Move workerview entry into settings menu
([#7761](https://github.com/n8n-io/n8n/issues/7761))
([366cd67](366cd672a7))
* **editor:** Only show push to git menu item to owners
([#7766](https://github.com/n8n-io/n8n/issues/7766))
([0d3d33d](0d3d33dd1f))
* **editor:** Show v1 banner dismiss button if owner
([#7722](https://github.com/n8n-io/n8n/issues/7722))
([44d3b3e](44d3b3ed7e))
* **editor:** Use project diagram icon for worker view
([#7764](https://github.com/n8n-io/n8n/issues/7764))
([ff0b651](ff0b6511f7))
* **editor:** Validate user info before submiting
([#7608](https://github.com/n8n-io/n8n/issues/7608))
([2064f7f](2064f7f251))
* **GitHub Node:** Fix issue preventing file edits on branches
([#7734](https://github.com/n8n-io/n8n/issues/7734))
([ce002a6](ce002a6cc6))
* **Google Sheets Node:** Check for `null` before destructuring
([#7729](https://github.com/n8n-io/n8n/issues/7729))
([5d4a52d](5d4a52d3b7))
* **Item Lists Node:** Don't check same type in remove duplicates
operation ([#7678](https://github.com/n8n-io/n8n/issues/7678))
([4f30764](4f307646f3))
* **JotForm Trigger Node:** Fix iteration on form loader
([#7751](https://github.com/n8n-io/n8n/issues/7751))
([82f3202](82f3202a2d))


### Features

* Add Creator hub link to Templates page
([#7721](https://github.com/n8n-io/n8n/issues/7721))
([4dbae0e](4dbae0e2e9))
* **core:** Coordinate manual workflow activation and deactivation in
multi-main scenario ([#7643](https://github.com/n8n-io/n8n/issues/7643))
([4c40825](4c4082503c))
* **editor:** Add node context menu
([#7620](https://github.com/n8n-io/n8n/issues/7620))
([8d12c1a](8d12c1ad8d))
* **editor:** Node IO filter
([#7503](https://github.com/n8n-io/n8n/issues/7503))
([1881765](18817651ec))

Co-authored-by: ivov <ivov@users.noreply.github.com>
2023-11-22 14:32:25 +01:00
कारतोफ्फेलस्क्रिप्ट™ db77353272
fix(core): Pass correct node reference to NodeExecuteFunctions.getLoadOptionsFunctions (no-changelog) (#7779)
NODE-947
2023-11-22 13:24:23 +01:00
Deborah 3c56404f96
docs: Add workflow template contribution to the contributing guide (#7777)
Github issue / Community forum post (link here to close automatically):
2023-11-22 11:40:20 +00:00
Milorad FIlipović 2064f7f251
fix(editor): Validate user info before submiting (#7608)
Validate first and last names before saving them to database. This
should prevent security issue with un-sanitized data that ends up in
emails.

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-11-22 12:14:44 +01: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 3459eb6c2f
refactor(core): Include execution progress in save settings (no-changelog) (#7769) 2023-11-21 17:33:44 +01:00
Iván Ovejero 5bdfcb4224
refactor: Upgrade to TypeScript 5.3 (no-changelog) (#7768)
https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/
2023-11-21 17:30:59 +01:00
Michael Auerswald 0d3d33dd1f
fix(editor): Only show push to git menu item to owners (#7766)
Removes the menu entry of "Push to Git" from the workflow menu for
non-owners, since they would not be able to push in the first place.
2023-11-21 15:20:15 +01:00
Michael Auerswald ff0b6511f7
fix(editor): Use project diagram icon for worker view (#7764)
Swap monster truck for project diagram icon
2023-11-21 15:18:14 +01:00
Marcus 4f307646f3
fix(Item Lists Node): Don't check same type in remove duplicates operation (#7678)
Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: Michael Kret <michael.k@radency.com>
2023-11-21 13:10:59 +01:00
Michael Auerswald 366cd672a7
fix(editor): Move workerview entry into settings menu (#7761)
As the worker view is not an essential function, it is being moved from
the main side bar to the settings side bar for the time being.
2023-11-21 11:29:24 +01:00
Iván Ovejero b7c5c7406f
fix(core): Ensure failed executions are saved in queue mode (#7744)
This PR adds `status` to run data so that
`determineFinalExecutionStatus` resolves correctly on execution failure
and removes the cleanup that is being duplicated in a worker hook.

Followup to https://github.com/n8n-io/n8n/pull/7138

Should fix:
- https://github.com/n8n-io/n8n/issues/7705
-
https://linear.app/n8n/issue/PAY-964/no-execution-found-after-execution-fails
-
https://linear.app/n8n/issue/PAY-1010/execution-deletion-in-queue-mode-not-complying-with-settings
2023-11-20 16:03:02 +01:00
Deborah ad04986ce7
docs: Update docs links for data transformation functions and ifEmpty (#7758)
Github issue / Community forum post (link here to close automatically):
2023-11-20 13:40:28 +00:00
Elias Meire 8d12c1ad8d
feat(editor): Add node context menu (#7620)
![image](https://github.com/n8n-io/n8n/assets/8850410/5a601fae-cb8e-41bb-beca-ac9ab7065b75)
2023-11-20 14:37:12 +01:00
Milorad FIlipović 4dbae0e2e9
feat: Add Creator hub link to Templates page (#7721)
Replace the `New Blank Workflow` button with link to the new Creator Hub
in the Templates page
2023-11-20 10:51:46 +01:00
Elias Meire c9f6ea141b
fix: Include cypress TypeScript types in /cypress folder (no-changelog) (#7746) 2023-11-20 09:26:25 +01:00
Iván Ovejero 0fda8d9aac
refactor(core): Stop reporting to Sentry NodeApiError outside 500 range (no-changelog) (#7753)
https://n8nio.sentry.io/issues/4312838883 (and many others)

Followup to https://github.com/n8n-io/n8n/pull/7662
2023-11-17 17:49:28 +01:00
Iván Ovejero 6be453b716
fix(core): Guard against node not found on cancelling test webhook (#7750)
https://n8nio.sentry.io/issues/4623682198
2023-11-17 17:10:26 +01:00
Iván Ovejero 82f3202a2d
fix(JotForm Trigger Node): Fix iteration on form loader (#7751)
https://n8nio.sentry.io/issues/4636463129
2023-11-17 16:42:30 +01:00
Iván Ovejero 6d19f88080
refactor(core): Stop reporting to Sentry unknown cred on mapping (no-changelog) (#7752)
https://n8nio.sentry.io/issues/4563418905
2023-11-17 16:17:44 +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
कारतोफ्फेलस्क्रिप्ट™ b3a3f16bc2 ci: Fix "Release: Create Pull Request" workflow 2023-11-17 14:59:01 +01:00
कारतोफ्फेलस्क्रिप्ट™ 2d039010db
fix(editor): Fix Admin panel icon in the sidebar for cloud deployments (no-changelog) (#7738)
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Mutasem Aldmour <mutasem@n8n.io>
2023-11-17 14:44:47 +01:00
कारतोफ्फेलस्क्रिप्ट™ b66b8c18e9
fix(editor): Remove n8nHooksNext flag (no-changelog) (#7733)
Hooks won't be injected anymore
https://github.com/n8n-io/n8n-hosted-backend/pull/816
2023-11-17 14:44:28 +01:00
Mutasem Aldmour 44d3b3ed7e
fix(editor): Show v1 banner dismiss button if owner (#7722)
Github issue / Community forum post (link here to close automatically):

https://community.n8n.io/t/v1-upgrade-banner-shall-be-dismissed-permanently/32775
2023-11-17 14:15:13 +01:00
Jon ce002a6cc6
fix(GitHub Node): Fix issue preventing file edits on branches (#7734)
Github issue / Community forum post (link here to close automatically):
https://github.com/n8n-io/n8n/issues/7614
2023-11-17 13:07:33 +00:00
कारतोफ्फेलस्क्रिप्ट™ db094f2d7e
fix(core): Fix all dependency versions for backend packages (no-changelog) (#7745)
Once the packages are published to NPM, they don't have the
`pnpm-lock.yaml` to fix dependency versions. Which means that any
dependency with `^` gets auto-upgrade to the latest matching minor,
which can cause issues like
[this](https://github.com/node-cache-manager/node-cache-manager/issues/611).
2023-11-17 13:49:18 +01:00
कारतोफ्फेलस्क्रिप्ट™ fc60e9a809
refactor(core): Convert dynamic node-parameter routes to a decorated controller (no-changelog) (#7284)
1. Reduce a lot of code duplication
2. Move more endpoints out of `Server.ts`
3. Move all query-param parsing and validation into a middleware to make
the route handlers simpler.
2023-11-17 12:03:05 +01:00
Iván Ovejero 05ed86c64b
refactor: Stop reporting to Sentry Facebook multi-webhook error (no-changelog) (#7743)
https://n8nio.sentry.io/issues/4640072705
2023-11-17 11:39:46 +01:00
Iván Ovejero 0408299c7d
refactor(core): Stop reporting to Sentry unrecognized node errors (no-changelog) (#7728)
https://n8nio.sentry.io/issues/4636584213
2023-11-17 10:25:10 +01:00
Iván Ovejero b4ebb1a28d
fix(core): Account for non-ASCII chars in filename on binary data download (#7742)
https://n8nio.sentry.io/issues/4641538638
2023-11-17 10:07:44 +01:00