Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev to master 2023 11 02 #46

Merged
merged 466 commits into from
Nov 3, 2023
Merged

Conversation

omrijoyous
Copy link

Github issue / Community forum post (link here to close automatically):

netroy and others added 30 commits August 1, 2023 17:47
* fix(editor): Fix redo when adding node on connection
* ✅ Adding tests for pushed nodes
* ✔️ Updating drag command for dragging nodes on the canvas
* 👌 Handling drag end with a command  option
* support redis cluster

* cleanup, fix config schema

* set default prefix to bull

* initial commit

* improve logging

* improve types and refactor

* list support and refactor

* fix redis service and tests

* add comment

* add redis and cache prefix

* use injection

* lint fix

* clean schema comments

* improve naming, tests, cluster client

* merge master

* cache returns unknown instead of T

* update cache service, tests and doc

* remove console.log

* do not cache null or undefined values

* fix merge

* lint fix
…ngelog) (n8n-io#6832)

fix: fix replacing node empty string value with default value
fix: fix double hiring banner logging (no-changelog)
fix: horizental overflow for dialogs
* support redis cluster

* cleanup, fix config schema

* set default prefix to bull

* initial commit

* improve logging

* improve types and refactor

* list support and refactor

* fix redis service and tests

* add comment

* add redis and cache prefix

* use injection

* lint fix

* clean schema comments

* improve naming, tests, cluster client

* merge master

* cache returns unknown instead of T

* update cache service, tests and doc

* remove console.log

* VariablesService as DI, add caching, fix tests

* do not cache null or undefined values

* import fix

* more DI and remove collections

* fix merge

* lint fix

* rename to ~Cached

* fix test for CI

* fix ActiveWorkflowRunner test
* ci: Parallelize `ci-master` (no-changelog)

* ci: Move notify-on-failure to own job

* ci: Fix syntax

* ci: Dry run by adding branch

* ci: Fix job reference

* ci: Ensure full lint

* ci: Restore `CI_LINT_MASTER`

* ci: Remove env from top level

* ci: Add matrix strategy

* ci: Remove excess quotes

* ci: Remove excess key

* ci: Try with `run_install`

* Revert "ci: Try with `run_install`"

This reverts commit e5778c5.

* ci: Add missing strategy

* ci: Remove temp branch

* test: Comment out test (from other PR)
* refactor: Create `RoleService`

* refactor: Refactor to use service

* refactor: Move `getUserRoleForWorkflow`

* refactor: Clear out old `RoleService`

* refactor: Consolidate utils into service

* refactor: Remove unused methods

* test: Add tests

* refactor: Remove redundant return types

* refactor: Missing utility

* chore: Remove commented out bit

* refactor: Make `Db.collections.Repository` inaccessible

* chore: Cleanup

* feat: Prepopulate cache

* chore: Remove logging

* fix: Account for tests where roles are undefined

* fix: Restore `prettier.prettierPath`

* test: Account for cache enabled and disabled

* fix: Restore `Role` in `Db.collections`

* refactor: Simplify by removing `orFail`

* refactor: Rename for clarity

* refactor: Use `cacheKey` for readability

* refactor: Validate role before creation

* refacator: Remove redundant `cache` prefix

* ci: Lint fix

* test: Fix e2e
fix: auth.api user limit test expecting incorrect status
* refactor: Initial setup

* Refactor for clarity

* Comments to clarify

* More replacements

* Simplify with `fullPath`

* Fix tests

* Implement remaining methods

* chore: Fix misresolved conflicts

* Simplify syntax

* Reduce diff

* Minor cleanup

* Fix lint

* Inject dependency

* Improve typings

* Remove unused method

* Restore method

* Add comment

* Rename in test

* Restore comments

* Clean up dynamic webhook handling

* Clean up tests

* Remove redundant `cache` prefix

* fix: Correct `uniquePath` for dynamic webhooks
…#6852)

* feat: Add workflow history initial setup

* fix: Add feature to missing controller
…6854)

* fix handle empty keys in cache service

* add test

* add cache mock test

* add simpler mocking, and add tests for all the updated methods

* don't use RedisStore specifically in the mock

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <[email protected]>
* add metrics to cache

* use events for metrics

* pr comments / broken test

* lint fix

* update the test

* improve tests

* Update packages/cli/src/config/schema.ts

* disable flaky test

* lint fix

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <[email protected]>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <[email protected]>
* add serverId and workerId

* adjust id format

* fix logger init / test

* update implementation
…6850)

* feat(editor): Add "Download" button if JSON data is to large

* ⚡ Some code improvements + change button style

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <[email protected]>
n8n-io#6862)

* fix(editor): Do not show mapping discoverability tooltip after dismiss

* test: add tooltip design system component test

* fix(editor): no need to dismiss mapping tooltip multiple times
krynble and others added 28 commits September 13, 2023 09:56
…8n-io#7094)

Github issue / Community forum post (link here to close automatically):

Since the change to allow workflow IDs to become strings in Nano ID
formats, this input broke.

This PR allows all characters that comprise workflow IDs.

---------

Co-authored-by: Iván Ovejero <[email protected]>
Context

When a user is attempting to interact with a foreground action inside an
entity card (workflow, credential, community node, logging destination),
they might accidentally open that entity instead of interacting with a
foreground action.

For these card components, actions are always placed on right side. 

A/C

Area around right "column" of entity cards (workflow, cred, community
node, logging destination) should not be a hoverable area (that opens
that entity when clicked). This area is roughly highlighted in screen
shot below in orange.


![image](https://github.com/n8n-io/n8n/assets/5410822/0916bcd5-e972-4367-a862-41d2086a2334)
# [1.7.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.7.0)
(2023-09-13)


### Bug Fixes

* **Code Node:** Disable WASM to address CVE-2023-37903
([n8n-io#7122](n8n-io#7122))
([36a8e91](n8n-io@36a8e91))
* **Code Node:** Upgrade vm2 to address CVE-2023-37466
([n8n-io#7123](n8n-io#7123))
([0a35025](n8n-io@0a35025))
* **core:** Disable Node.js custom inspection to address CVE-2023-37903
([n8n-io#7125](n8n-io#7125))
([a223734](n8n-io@a223734))
* **editor** Account for nanoid workflow ids for subworkflow execute
policy ([n8n-io#7094](n8n-io#7094))
([67092c0](n8n-io@67092c0))
* **editor:** Tweak hover area of workflow / cred cards
([n8n-io#7108](n8n-io#7108))
([217de21](n8n-io@217de21))
* **editor:** Unbind workflow endpoint events in case of workspace reset
([n8n-io#7129](n8n-io#7129))
([c9b7948](n8n-io@c9b7948))
* **editor:** Update git repo url validation regex
([n8n-io#7151](n8n-io#7151))
([e51f173](n8n-io@e51f173))
* **Google Cloud Firestore Node:** Fix empty string interpreted as
number ([n8n-io#7136](n8n-io#7136))
([915cfa0](n8n-io@915cfa0))
* **HubSpot Node:** Fix issue with contact lists not working
([n8n-io#5582](n8n-io#5582))
([6e5a4f6](n8n-io@6e5a4f6))
* **Postgres Node:** Fix automatic column mapping
([n8n-io#7121](n8n-io#7121))
([92af131](n8n-io@92af131))
* **Zoho CRM Node:** Fix issue with Sales Order not updating
([n8n-io#6959](n8n-io#6959))
([fd800b6](n8n-io@fd800b6))


### Features

* **core:** Add an option to enable WAL mode for SQLite
([n8n-io#7118](n8n-io#7118))
([1d1a022](n8n-io@1d1a022))
* **core:** Add commands to workers to respond with current state
([n8n-io#7029](n8n-io#7029))
([7b49cf2](n8n-io@7b49cf2))
* **Salesforce Node:** Add fax field to lead option
([n8n-io#7030](n8n-io#7030))
([01f875a](n8n-io@01f875a))

Co-authored-by: netroy <[email protected]>
Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <[email protected]>
…-io#7163)

This PR solves the issue reported in [this
ticket](https://linear.app/n8n/issue/PAY-825/click-to-connect-for-google-sheets-does-not-work-when-cred-is-not).

Basically when trying to connect OAuth2 credentials, n8n would create
the credential twice, possibly causing transaction issues.

This PR prevents n8n from firing a duplicate creation request,
effectively fixing the bug about duplicate creation.
…ue mode (n8n-io#7138)

# Motivation

In Queue mode, finished executions would cause the main instance to
always pull all execution data from the database, unflatten it and then
use it to send out event log events and telemetry events, as well as
required returns to Respond to Webhook nodes etc.

This could cause OOM errors when the data was large, since it had to be
fully unpacked and transformed on the main instance’s side, using up a
lot of memory (and time).

This PR attempts to limit this behaviour to only happen in those
required cases where the data has to be forwarded to some waiting
webhook, for example.

# Changes

Execution data is only required in cases, where the active execution has
a `postExecutePromise` attached to it. These usually forward the data to
some other endpoint (e.g. a listening webhook connection).

By adding a helper `getPostExecutePromiseCount()`, we can decide that in
cases where there is nothing listening at all, there is no reason to
pull the data on the main instance.

Previously, there would always be postExecutePromises because the
telemetry events were called. Now, these have been moved into the
workers, which have been given the various InternalHooks calls to their
hook function arrays, so they themselves issue these telemetry and event
calls.

This results in all event log messages to now be logged on the worker’s
event log, as well as the worker’s eventbus being the one to send out
the events to destinations. The main event log does…pretty much nothing.

We are not logging executions on the main event log any more, because
this would require all events to be replicated 1:1 from the workers to
the main instance(s) (this IS possible and implemented, see the worker’s
`replicateToRedisEventLogFunction` - but it is not enabled to reduce the
amount of traffic over redis).

Partial events in the main log could confuse the recovery process and
would result in, ironically, the recovery corrupting the execution data
by considering them crashed.

# Refactor

I have also used the opportunity to reduce duplicate code and move some
of the hook functionality into
`packages/cli/src/executionLifecycleHooks/shared/sharedHookFunctions.ts`
in preparation for a future full refactor of the hooks
PR adds a new field to the SourceControlPreferences as well as to the
POST parameters for the `source-control/preferences` and
`source-control/generate-key-pair` endpoints. Both now accept an
optional string parameter `keyGeneratorType` of `'ed25519' | 'rsa'`

Calling the `source-control/generate-key-pair` endpoint with the
parameter set, it will also update the stored preferences accordingly
(so that in the future new keys will use the same method)

By default ed25519 is being used. The default may be changed using a new
environment parameter:

`N8N_SOURCECONTROL_DEFAULT_SSH_KEY_TYPE` which can be `rsa` or `ed25519`

RSA keys are generated with a length of 4096 bytes.
@omrijoyous omrijoyous merged commit f39dc3c into master Nov 3, 2023
3 of 7 checks passed
@omrijoyous omrijoyous deleted the merge-dev-to-master-2023-11-02 branch November 3, 2023 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.