-
Notifications
You must be signed in to change notification settings - Fork 600
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
feat: websocket trigger allow returning messages #5168
feat: websocket trigger allow returning messages #5168
Conversation
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.
👍 Looks good to me! Reviewed everything up to 65e3946 in 3 minutes and 0 seconds
More details
- Looked at
1767
lines of code in19
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/src/routes/(root)/(logged)/websocket_triggers/+page.svelte:225
- Draft comment:
Consistently use 'WebSocket' instead of 'websocket' for clarity and correctness. This applies to other instances in the code as well. - Reason this comment was not posted:
Comment looked like it was already resolved.
2. frontend/src/routes/(root)/(logged)/websocket_triggers/+page.svelte:329
- Draft comment:
Consistently use 'WebSocket' instead of 'websocket' for clarity and correctness. This applies to other instances in the code as well. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_A6NQKIEw7ruAxUuT
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Deploying windmill with
|
Latest commit: |
167de6c
|
Status: | ✅ Deploy successful! |
Preview URL: | https://8cc4ebf1.windmill.pages.dev |
Branch Preview URL: | https://hugo-win-876-sending-websock.windmill.pages.dev |
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.
👍 Looks good to me! Incremental review on 167de6c in 42 seconds
More details
- Looked at
388
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. backend/windmill-api/src/jobs.rs:3606
- Draft comment:
Consider improving error handling inrun_wait_result_internal
for clarity and consistency. Currently, it returns an error message directly, which might not be consistent with other parts of the codebase. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a new functionrun_wait_result_internal
which is used in multiple places. The functionrun_wait_result
now callsrun_wait_result_internal
. This refactoring is good for code reuse and separation of concerns. However, the error handling inrun_wait_result_internal
could be improved for clarity and consistency.
2. backend/windmill-api/src/websocket_triggers.rs:604
- Draft comment:
Ensure that the SQL query for fetchingearly_return
is optimized for performance. Consider indexing theflow_version
table appropriately and using thearray_upper
function efficiently. - Reason this comment was not posted:
Confidence changes required:40%
The PR introduces a SQL query to fetchearly_return
from theflow_version
table. This query is used in multiple places. However, the query could be optimized by ensuring that thearray_upper
function is used efficiently, and the query is indexed properly for performance.
Workflow ID: wflow_hBMQey6ZlwQhwn6i
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Add support for WebSocket triggers to return messages, including backend logic and frontend UI updates.
can_return_message
column towebsocket_trigger
table inmigrations/20250129094837_websocket_can_return_message.up.sql
andmigrations/20250129094837_websocket_can_return_message.down.sql
.run_wait_result_internal()
injobs.rs
to return a tuple with result and success status.create_websocket_trigger()
andupdate_websocket_trigger()
inwebsocket_triggers.rs
to handlecan_return_message
.listen_to_websocket()
inwebsocket_triggers.rs
to handle message sending back to WebSocket server.can_return_message
toggle inWebsocketTriggerEditorInner.svelte
andWebsocketEditorConfigSection.svelte
.ToggleButton
andDropdown
are updated to support new WebSocket functionality.This description was created by
for 167de6c. It will automatically update as commits are pushed.