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

fix(core): Setup websocket keep-live messages #6866

Merged
merged 2 commits into from
Aug 28, 2023
Merged

fix(core): Setup websocket keep-live messages #6866

merged 2 commits into from
Aug 28, 2023

Conversation

netroy
Copy link
Member

@netroy netroy commented Aug 7, 2023

fixes #6757

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Make sure to check off this list before asking for review.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Aug 7, 2023
@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (0913e0d) 25.06% compared to head (b09029d) 25.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6866      +/-   ##
==========================================
- Coverage   25.06%   25.05%   -0.01%     
==========================================
  Files        3149     3149              
  Lines      191932   191949      +17     
  Branches    21112    21109       -3     
==========================================
- Hits        48105    48102       -3     
- Misses     142846   142866      +20     
  Partials      981      981              
Files Changed Coverage Δ
packages/cli/src/push/index.ts 24.56% <0.00%> (ø)
packages/cli/src/push/websocket.push.ts 7.69% <0.00%> (-14.53%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@luizeof
Copy link
Contributor

luizeof commented Aug 7, 2023

hello @netroy do you plan to publish to docker hub?

@netroy
Copy link
Member Author

netroy commented Aug 7, 2023

@luizeof just pushed a custom image with the tag ws-keepalive.

@netroy
Copy link
Member Author

netroy commented Aug 15, 2023

@luizeof did you test the docker image?

@netroy
Copy link
Member Author

netroy commented Aug 25, 2023

@luizeof Can you let us know if this change fixes the issue for you? if not, we should close this PR.

@luizeof
Copy link
Contributor

luizeof commented Aug 25, 2023

hello @netroy .. sorry for the long wait

this docker image does not load, it gives an error with redis (but redis is correct)

image

@netroy
Copy link
Member Author

netroy commented Aug 25, 2023

The branch was likely missing this fix.
Just rebased the branch, and built a new image.
Can you please try again 🙏🏽.

@luizeof
Copy link
Contributor

luizeof commented Aug 25, 2023

@netroy .. it works !!! cloudflare didn't drop the connection.

Thanks !!!!

Copy link
Contributor

@krynble krynble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cypress
Copy link

cypress bot commented Aug 28, 2023

2 flaky tests on run #2015 ↗︎

0 232 0 0 Flakiness 2

Details:

🌳 ws-keepalive 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project: n8n Commit: bae9b3d18e
Status: Passed Duration: 09:23 💡
Started: Aug 28, 2023 7:38 AM Ended: Aug 28, 2023 7:47 AM
Flakiness  16-webhook-node.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Webhook Trigger node > should listen for a POST request Output Screenshots Video
Flakiness  24-ndv-paired-item.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > resolves expression with default item when input node is not parent, while still pairing items Output Screenshots Video

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@netroy netroy merged commit 8bdb07d into master Aug 28, 2023
50 of 51 checks passed
@netroy netroy deleted the ws-keepalive branch August 28, 2023 08:26
@krynble
Copy link
Contributor

krynble commented Aug 28, 2023

QQ about this one: I do not see anything in my browser's console related to the ping events. I'm guessing this is due to be an internal protocol mechanism that is not broadcasted externally, am I correct in this assumption? I debugged the code and I could see the ping being called correctly, so I assume it's all well.

@netroy
Copy link
Member Author

netroy commented Aug 28, 2023

QQ about this one: I do not see anything in my browser's console related to the ping events. I'm guessing this is due to be an internal protocol mechanism that is not broadcasted externally, am I correct in this assumption?

Yeah, browser devtools do not show non-data frames like ping-pong, binary data, or connection close frame. The only way to test this is on the server-side, like you did.

@github-actions github-actions bot mentioned this pull request Aug 31, 2023
netroy added a commit that referenced this pull request Aug 31, 2023
# [1.5.0](https://github.com/n8n-io/n8n/compare/n8n@1.4.0...n8n@1.5.0)
(2023-08-31)


### Bug Fixes

* **Agile CRM Node:** Fix issue with company address not working
([#6997](#6997))
([2f81652](2f81652))
* **Code Node:** Switch over to vm2 fork
([#7018](#7018))
([dfe0fa6](dfe0fa6))
* **core:** Invalid NODES_INCLUDE should not crash the app
([#7038](#7038))
([04e3178](04e3178)),
closes [#6683](#6683)
* **core:** Setup websocket keep-live messages
([#6866](#6866))
([8bdb07d](8bdb07d)),
closes [#6757](#6757)
* **core:** Throw `NodeSSLError` only for nodes that allow ignoring SSL
issues ([#6928](#6928))
([a01c3fb](a01c3fb))
* **Date & Time Node:** Dont parse date if it's not set (null or
undefined) ([#7050](#7050))
([d72f79f](d72f79f))
* **editor:** Fix sending of Ask AI tracking events
([#7002](#7002))
([fb05afa](fb05afa))
* **Microsoft Excel 365 Node:** Support for more extensions in workbook
rlc ([#7020](#7020))
([d6e1cf2](d6e1cf2))
* **MongoDB Node:** Stringify response ObjectIDs
([#6990](#6990))
([9ca990b](9ca990b))
* **MongoDB Node:** Upgrade mongodb package to address CVE-2021-32050
([#7054](#7054))
([d3f6356](d3f6356))
* **Postgres Node:** Empty return data fix for Postgres and MySQL
([#7016](#7016))
([176ccd6](176ccd6))
* **Webhook Node:** Fix URL params for webhooks
([#6986](#6986))
([596b569](596b569))


### Features

* **core:** External Secrets storage for credentials
([#6477](#6477))
([ed927d3](ed927d3))
* **core:** Add MFA ([#4767](#4767))
([2b7ba6f](2b7ba6f))
* **core:** Add filtering, selection and pagination to users
([#6994](#6994))
([b716241](b716241))
* **editor:** Debug executions in the editor
([#6834](#6834))
([c833078](c833078))
* **RSS Read Node:** Add support for self signed certificates
([#7039](#7039))
([3b9f0fe](3b9f0fe))

Co-authored-by: netroy <netroy@users.noreply.github.com>
@janober
Copy link
Member

janober commented Aug 31, 2023

Got released with n8n@1.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Connection lost" - Can't save workflows
4 participants