Commit graph

11 commits

Author SHA1 Message Date
Iván Ovejero 667c15d0df
fix(core): Filter out workflows that failed to activate on startup (#6676)
* fix(core): Deactivate on init workflow that should not be retried

* fix(core): Filter out workflows with activation errors
2023-07-18 15:57:14 +02:00
Michael Auerswald d143f3f2ec
feat(core): Add execution runData recovery and status field (#5112)
* adds ExecutionEvents view modal to ExecutionList

* fix time rendering and remove wf column

* checks for unfinished executions and fails them

* prevent re-setting stoppedAt for execution

* some cleanup / manually create rundata after crash

* quicksave

* remove Threads lib, log worker rewrite

* cleanup comment

* fix sentry destination return value

* test for tests...

* run tests with single worker

* fix tests

* remove console log

* add endpoint for execution data recovery

* lint cleanup and some refactoring

* fix accidental recursion

* remove cyclic imports

* add rundata recovery to Workflowrunner

* remove comments

* cleanup and refactor

* adds a status field to executions

* setExecutionStatus on queued worker

* fix onWorkflowPostExecute

* set waiting from worker

* get crashed status into frontend

* remove comment

* merge fix

* cleanup

* catch empty rundata in recovery

* refactor IExecutionsSummary and inject nodeExecution Errors

* reduce default event log size to 10mb from 100mb

* add per node execution status

* lint fix

* merge and lint fix

* phrasing change

* improve preview rendering and messaging

* remove debug

* Improve partial rundata recovery

* fix labels

* fix line through

* send manual rundata to ui at crash

* some type and msg push fixes

* improve recovered item rendering in preview

* update workflowStatistics on recover

* merge fix

* review fixes

* merge fix

* notify eventbus when ui is back up

* add a small timeout to make sure the UI is back up

* increase reconnect timeout to 30s

* adjust recover timeout and ui connection lost msg

* do not stop execution in editor after x reconnects

* add executionRecovered push event

* fix recovered connection not green

* remove reconnect toast and  merge existing rundata

* merge editor and recovered data for own mode
2023-02-17 10:54:07 +01:00
Iván Ovejero 0a7ea89633
fix: Fix formatting/linting for CI (no-changelog) (#5264)
* ⬆️ Upgrade Prettier

* 📦 Update `pnpm-lock.yaml`

* 🎨 Format all packages

* 🔧 Specify `prettierPath`
2023-01-27 10:18:15 +01:00
Michael Auerswald 62d06b1e6e
fix(core): Fixes event msg confirmations if no subscribers present (#5118)
* adds ExecutionEvents view modal to ExecutionList

* fix time rendering and remove wf column

* checks for unfinished executions and fails them

* prevent re-setting stoppedAt for execution

* removing UI changes but keeping eventbus fixes

* remove comment
2023-01-11 14:09:09 +01:00
Valya 3d05acf313
feat: Expression extension framework (#4372)
*  Introduce a framework for expression extension

* 💡 Add some inline comments

*  Introduce hash alias for encrypt

*  Introduce a manual granular level approach to shadowing/overrideing extensions

* 🔥 Cleanup comments

*  Introduce a basic method of extension for native functions

*  Add length to StringExtension

*  Add number type to extension return types

*  Temporarily introduce DateTime with extension

*  Cleanup comments

*  Organize imports

* ♻️ Fix up some typings

*  Fix typings

* ♻️ Remove unnecessary resolve of expression

*  Extensions Improvement

* ♻️ Refactor EXPRESSION_EXTENSION_METHODS

* ♻️ Refactor EXPRESSION_EXTENSION_METHODS

* ♻️ Update extraArgs types

* ♻️ Fix tests

* ♻️ Fix bind type issue

* ♻️ Fixing duration type issue

* ♻️ Refactor to allow overrides on native methods

* ♻️ Temporarily remove Date Extensions to pass tests

* feat(dt-functions): introduce date expression extensions (#4045)

* 🎉 Add Date Extensions into the mix

*  Introduce additional date extension methods

*  Add Date Expression Extension tests

* 🔧 Add ability to debug tests

* ♻️ Refactor extension for native types

* 🔥 Move sayHi method to String Extension class

* ♻️ Update scope when binding member methods

*  Add String Extension tests

* feat(dt-functions): introduce array expression extensions (#4044)

*  Introduce Array Extensions

*  Add Array Expression tests

* feat(dt-functions): introduce number expression extensions (#4046)

* 🎉 Introduce Number Extensions

*  Support more shared extensions

*  Improve handling of name collision

*  Update tests

* Fixed up tests

* 🔥 Remove remove markdown

* :recylce: Replace remove-markdown dependencies with implementation

* ♻️ Replace remove-markdown dependencies with implementation

*  Update tests

* ♻️ Fix scoping and cleanup

* ♻️ Update comments and errors

* ♻️ Fix linting errors

*  Remove unused dependencies

* fix: expression extension not working with multiple extensions

* refactor: change extension transform to be more efficient

* test: update most test to work with new extend function

* fix: update and fix type error in config

* refactor: replace babel with recast

* feat: add hashing functions to string extension

* fix: removed export

* test: add extension parser and transform tests

* fix: vite tests breaking

* refactor: remove commented out code

* fix: parse dates passed from $json in extend function

* refactor: review feedback changes for date extensions

* refactor: review feedback changes for number extensions

* fix: date extension beginningOf test

* fix: broken build from merge

* fix: another merge issue

* refactor: address review feedback (remove ignores)

* feat: new extension functions and tests

* feat: non-dot notation functions

* test: most of the other tests

* fix: toSentenceCase for node versions below 16.6

* feat: add $if and $not expression extensions

* Fix test to work on every timezone

* lint: fix remaining lint issues

Co-authored-by: Csaba Tuncsik <csaba@n8n.io>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2023-01-10 14:06:12 +01:00
कारतोफ्फेलस्क्रिप्ट™ 8675b45e43
fix: Improve VSCode debugging setup (no-changelog) (#4922)
* gracefully shutdown n8n while debugging in vscode

* capture stdout/stderr in vscode debugging instead of just the console.logs
2022-12-14 11:59:06 +01:00
Iván Ovejero 78119c9f22
refactor: Consolidate .prettierignore patterns (no-changelog) (#4692)
*  Consolidate Prettier ignore patterns

*  Let Prettier select file types to format

* 🎨 Apply formatting
2022-11-22 14:11:29 +01:00
कारतोफ्फेलस्क्रिप्ट™ 41cb0eec6e
feat(API): Set up error tracking using Sentry (#4394)
* feat(cli): Setup error tracking using Sentry

* make error reporting available in the workflows package

* address some of the PR comments

* create a ErrorReporterProxy like LoggerProxy

* remove the `captureError` helper. use ErrorReporterProxy directly

* fix linting issues

* remove ErrorReporterProxy warnings in tests

* check for NODE_ENV === 'production' instead

* IErrorReporter -> ErrorReporter

* ErrorReporterProxy.getInstance() -> ErrorReporter

* allow capturing stacks in warnings as well

* make n8n debugging consistent with `npm start`

* IReportingOptions -> ReportingOptions

* use consistent signature for `error` and `warn`

* use Logger instead of console.log
2022-11-04 17:34:47 +01:00
Omar Ajoue b5c831122c
Add some tests to ActiveExecutions file (#3957)
* Add some tests to ActiveExecutions file
2022-08-30 10:49:30 +02:00
Iván Ovejero 11617616cd
refactor: Format root-level files (#3858)
*  Create `format.mjs` script

* 👕 Add lint exception

*  Add root formatting to `format` command

* 🎨 Fix glob in `.prettierignore`

* 🚚 Improve naming

* 🎨 Format root-level files

*  Simplify check

*  Add period to extension

*  Locate config

*  Add `ignore` arg

* 🚚 Move `config` and `ignore` after check
2022-08-19 15:34:02 +02:00
Omar Ajoue 13c3b41c81
feat: Add debug configuration file with instructions (#3631)
* Add debug configuration file with instructions

* Add debugger.md file for clarifications

* Moved debugger file to vscode folder
2022-07-04 10:42:15 +02:00