-
Notifications
You must be signed in to change notification settings - Fork 49.6k
fix(editor): Fix memory leak in Node Detail View by correctly unsubscribing from event buses #6021
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
Conversation
…yed (no-changelog)
|
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
Files matching
Files matching
Files matching
Make sure to check off this list before asking for review. |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #6021 +/- ##
=======================================
Coverage 18.67% 18.67%
=======================================
Files 2582 2582
Lines 116479 116476 -3
Branches 18178 18177 -1
=======================================
+ Hits 21751 21752 +1
+ Misses 94090 94086 -4
Partials 638 638 see 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
|
✅ All Cypress E2E specs passed |
netroy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
✅ All Cypress E2E specs passed |
|
|
1 flaky tests on run #524 ↗︎Details:
|
|||||||||||||||||||||
| Test | Artifacts | |
|---|---|---|
| Sharing > should have access to W1, W2, as U1 |
Output
Screenshots
Video
|
|
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
|
✅ All Cypress E2E specs passed |
|
✅ All Cypress E2E specs passed |
|
✅ All Cypress E2E specs passed |
| ); | ||
| cy.window().then( | ||
| (win) => { | ||
| // @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we augment the typeof win to have preventNodeViewBeforeUnload?: boolean, so we don't need to sprinkle // @ts-ignore in so many places ?
|
✅ All Cypress E2E specs passed |
1 similar comment
|
✅ All Cypress E2E specs passed |
…ribing from event buses (#6021)
…ribing from event buses (#6021)
|
Got released with |
* master: (199 commits) feat(editor): Add disable template experiment (#5963) feat(core): Upgrade google-timezones-json to use the correct timezone for Sao Paulo (#6042) fix(Code Node): Update vm2 to address CVE-2023-30547 (#6039) docs: Add proprietary license text (no-changelog) (#6038) test(n8n Node): Unit tests (no-changelog) refactor: Accumulate `loadOptions` from all node versions to validate (no-changelog) (#6014) Update CHANGELOG.md feat: Add variables e2e tests (no-changelog) (#6027) fix(editor): Fix typo in SSO upgrade link (#6031) fix(editor): Add correct add variable button message when no variables created (no-changelog) (#6028) docs: Add api notice to credentials for google sheets nodes (no-changelog) (#6024) fix(Notion Node): Update credential test to not require user permissions (#6022) fix(editor): Clean up demo and template callouts from workflows page (#6023) fix(editor): Fix memory leak in Node Detail View by correctly unsubscribing from event buses (#6021) fix(editor): SettingsSidebar should disconnect from push when navigating away (#6025) fix(editor): Use fake timers in useDebounce.test.ts to make the test less flaky (no-changelog) (#6029) docs: Update the info URL for updating n8n (no-changelog) (#6018) fix(core): Improve domain and url matching for extractDomain and extractUrl (#6010) feat(core): Add SSH key generation (#6006) fix(editor): Update SSO upgrade link (#6016) ... # Conflicts: # packages/editor-ui/src/components/WorkflowShareModal.ee.vue # packages/editor-ui/src/stores/workflows.ts # packages/editor-ui/src/views/NodeView.vue
…ribing from event buses (n8n-io#6021)
This PR addresses two issues related to eventBus subscriptions and the implementation of
onBeforeUnloadin NodeView.Unsubscribing from eventBus: There's several instances where
eventBus.onwas used without properly unsubscribing usingeventBus.off, or whereeventBus.offwas called without an appropriate handler. This PR ensures correct event bus unsubscription to prevent memory leaks.Modifying
onBeforeUnloadin NodeView: The previous implementation involved appending theonBeforeUnloadhandler to the global window object, so it could later be disabled from e2e tests. Instead, we now check if thepreventNodeViewBeforeUnloadproperty exists in the window object, and terminate the handler if true.Github issue / Community forum post (link here to close automatically):