codeant-ai-for-open-source[bot] commented on code in PR #43434:
URL: https://github.com/apache/superset/pull/43434#discussion_r3839139599


##########
superset-websocket/src/index.ts:
##########
@@ -670,8 +592,8 @@ if (startServer) {
   httpServer.listen(opts.port);
   logger.info(`Server started on port ${opts.port}`);
 
-  // start reading from event stream
-  subscribeToGlobalStream(GLOBAL_EVENT_STREAM_NAME, processStreamResults);
+  // start receiving realtime messages from Redis Pub/Sub
+  subscribeToChannels();

Review Comment:
   **Suggestion:** The asynchronous subscription is started without awaiting it 
or attaching a local failure handler. If Redis connection setup or `psubscribe` 
rejects, the HTTP/WebSocket server continues running but receives no realtime 
messages, leaving the transport silently unavailable. Start the subscription 
before accepting traffic and handle failure explicitly, such as by aborting 
startup or retrying with an observable error state. [possible bug]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Realtime task notifications can be missed after Redis startup failure.
   - ⚠️ Health checks report ready before Pub/Sub readiness.
   - ⚠️ Entity-change delivery remains unavailable until subscription recovery.
   ```
   </details>
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-websocket/src/index.ts
   **Line:** 595:596
   **Comment:**
        *Possible Bug: The asynchronous subscription is started without 
awaiting it or attaching a local failure handler. If Redis connection setup or 
`psubscribe` rejects, the HTTP/WebSocket server continues running but receives 
no realtime messages, leaving the transport silently unavailable. Start the 
subscription before accepting traffic and handle failure explicitly, such as by 
aborting startup or retrying with an observable error state.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43434&comment_hash=f8fe4c41071d94175443fa64c4d87d1591a74a998d0dcc7e2f1641c40513963c&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43434&comment_hash=f8fe4c41071d94175443fa64c4d87d1591a74a998d0dcc7e2f1641c40513963c&reaction=dislike'>👎</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to