extracted out of #7336
---------
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Alex Grozav <alex@grozav.com>
This change expands on the command channel communication introduced
lately between the main instance(s) and the workers. The frontend gets a
new menu entry "Workers" which will, when opened, trigger a regular call
to getStatus from the workers. The workers then respond via their
response channel to the backend, which then pushes the status to the
frontend.
This introduces the use of ChartJS for metrics.
This feature is still in MVP state and thus disabled by default for the
moment.
When ever we have migrations that use `.addColumn` or `.dropColumn`,
typeorm recreates tables for sqlite. so, we need to disable foreign key
enforcement for sqlite, or else data in some tables can get deleted
because of `ON DELETE CASCADE`
[This has happened in the
past](https://github.com/n8n-io/n8n/pull/6739), and we should really
come up with a way to prevent this from happening again.
---------
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
* test(editor): Add canvas actions E2E tests (#6723)
* test(editor): Add canvas actions E2E tests
* test(editor): Open category items in node creator when category dropped on canvas
* test(editor): Have new position counted only once in drag
* test(editor): rename test
(cherry picked from commit 052d82b220)
* test: fix drag positioning
* test(editor): Add canvas actions E2E tests
* test(editor): Open category items in node creator when category dropped on canvas
* test(editor): Have new position counted only once in drag
* test(editor): rename test
* test: Add /setup intercept for `skipSetup` command (no-changelog)
* Drop all tables for e2e reset, intercept account setup request
* Fix linting issues
* Allow to skip setup account request intercept and linting fixes
* Make sure variables are loaded
* Use PATCH for enabling of e2e features
* Do not exclude migration table from truncation
* Add user sign-up intercept
* feat(editor): Add support for schema view in the NDV output
* Make intercepts waiting optional in waitForLoad method
* Update RunDataSchema snapshots
* Do not reset output panel view on execution, properly key run RunDataSchemaItem to make sure they are unique across panels
* Update snapshot tests
* Make adding of schema view button option more readable
* test: add tests for pinning
* test: add test for value
* test: add pinned data tests
* test: refactor into ndv
* refactor: move to ndv
* refactor: rename node
* test: fix test
* test: fix refactor
* test: remove unused id
* test: update test
* test: chain rename input
* test: refactor invoking text
* test: fix ndv tests
* test: move test id
* test: add tests for mapping
* test: update selectors
* test: add mapping
* test: remove wait
* test: add back line removed by mistake
* test: refactor to support both in/output displays
* test: add display mode switching
* test: fix drop
* chore: clean up change
* refactor: add draganddrop
* fix: fix drag and drop
* test: add mapping test for second value
* test: update text
* test: update param
* ✨ Added history store and mixin
* ✨ Implemented node position change undo/redo
* ✨ Implemented move nodes bulk command
* ⚡ Not clearing the redo stack after pushing the bulk command
* 🔨 Implemented commands using classes
* 🔥 Removed unnecessary interfaces and actions
* 🔥 Removing unused constants
* 🔨 Refactoring classes file
* ⚡ Adding eventBus to command obects
* ✨ Added undo/redo support for adding and removing nodes
* ✨ Implemented initial add/remove connections undo support
* ⚡ Covering some corner cases with reconnecting nodes
* ⚡ Adding undo support for reconnecting nodes
* ⚡ Fixing going back and forward between undo and redo
* ✨ Implemented async command revert
* ⚡ Preventing push to undo if bulk redo/undo is in progress
* ⚡ Handling re-connecting nodes and stopped pushing empty bulk actions to undo stack
* ✨ Handling adding a node between two connected nodes
* ⚡ Handling the case of removing multiple connections on the same index. Adding debounce to undo/redo keyboard calls
* ⚡ Removing unnecessary timeouts, adding missing awaits, refactoring
* ⚡ Resetting history when opening new workflow, fixing incorrect bulk recording when inserting node
* ✔️ Fixing lint error
* ⚡ Minor refactoring + some temporary debugging logs
* ⚡ Preserving node properties when undoing it's removal, removing some unused repaint code
* ✨ Added undo/redo support for import workflow and node enable/disable
* 🔥 Removing some unused constant
* ✨ Added undo/redo support for renaming nodes
* ⚡ Fixing rename history recording
* ✨ Added undo/redo support for duplicating nodes
* 📈 Implemented telemetry events
* 🔨 A bit of refactoring
* ⚡ Fixing edgecases in removing connection and moving nodes
* ⚡ Handling case of adding duplicate nodes when going back and forward in history
* ⚡ Recording connections added directly to store
* ⚡ Moving main history reset after wf is opened
* 🔨 Simplifying rename recording
* 📈 Adding NDV telemetry event, updating existing event name case
* 📈 Updating telemetry events
* ✅ Added initial undo/redo tests
* ⚡ Fixing duplicate connections on undo/redo
* ⚡ Stopping undo events from firing constantly on keydown
* ✅ Added connection test for undo/redo
* 📈 Updated telemetry event for hitting undo in NDV
* ⚡ Adding undo support for disabling nodes using keyboard shortcuts
* ✅ Added more tests for adding and deleting nodes undo/redo
* ⚡ Preventing adding duplicate connection commands to history
* 📈 Adding connection assertions to delete node tests
* ⚡ Clearing redo stack when new change is added
* ⚡ Preventing adding connection actions to undo stack while redoing them
* 👌 Addressing PR comments part 1
* 👌 Moving undo logic for disabling nodes to `NodeView`
* 👌 Implemented command comparing logic
* ⚡ Fix for not clearing redo stack on every user action
* ⚡ Fixing recording when moving nodes
* ⚡ Fixing undo for moving connections
* ⚡ Fixing tracking new nodes after latest merge
* ⚡ Fixing broken bulk delete
* ✅ Added tests for moving nodes
* ✅ Added tests for deleting connections
* ✅ Added tests for disabling nodes
* ✅ Added node rename tests
* ✅ Added tests for duplicating and pasting nodes
* ✅ Added multi-step undo/redo tests
* ✅ Fixing assertion condition
* ✅ Fixing timeout issue between keyboard strokes
* ⬆️ Updating pnpm lock file
* ✅ Waiting for page load to finish before each test
* ✅ Adding proper handling of meta key press
* 🚨 Temporarily disabling slack notifications
* ✅ Adding check before clicking connection actions
* ⚡ Removing comments from other undo tests
* 🎨 Fixing a typo
* test(editor): Fix flaky add tags e2e specs, and upload cypress artifacts on failure
* Only run smoke test to debug the pipeline
* Add waitForLoad command and revert debugging changes
* test(editor): Fix default-owner and credentials saving e2e specs
* test(editor): fix webhook node test
* test(editor): add cy command for browser permissions
* test(editor): add cy command for reading clipboard
* Fix 3-default-owner spec
* Resolve review comments
* Merge spec
* Fix http node and expression editor modal specs
* Add optional param to credentials modal saving action to wait for the test endpoint
* Improve sidebar items clicking and increase credentials saving timeout
* Rename http e2e spec to fix ordering
* Fix pasting and copying of nodes e2e spec
* Make sure to only access error.cause if it exists
* Wait longer for the keyboard press
* Make sure to focus the body when typing
* Try type delay
* Use meta key based on the running platform
* Fix flaky workflowTagElements getter
Co-authored-by: Csaba Tuncsik <csaba@n8n.io>
* feat: Make use of db:reset in all test suites
* refactor: Rename task to no longer use db: prefix
* feat: wrap cypress tasks into commands
* refactor: rename resetDatabase to resetAll
* fix: update test:e2e:all to use --headless
* use user-folder override consistently everywhere, including for the `.cache` folder
* use consistent config for e2e tesing, skipping config loading from env and config files
* simplify all the cypress commands, and run all e2e tests on master
* add tests for skipping owner setup
* add todos
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>