Amer-Mukhtar opened a new pull request, #7848:
URL: https://github.com/apache/texera/pull/7848

   Description
   
   What changes were proposed in this PR?
   
   In myOnMsg, the case other arm read the current execution with 
workflowStateOpt.map(_.executionService.getValue). executionService is a 
BehaviorSubject seeded with null, so map wraps that null into Some(null) and 
the case None arm never runs. A runtime frame arriving before an execution 
exists therefore fails with a NullPointerException on value.wsInput instead of 
the intended IllegalStateException("workflow execution is not initialized").
   
   The arm now reads executionStateOpt, the null safe value already computed at 
the top of the method, so an absent execution reaches the case None arm and the 
intended message is produced.
   
   The same gap in the ModifyLogicRequest branch is outside the scope of this 
issue and remains recorded in the spec's header comment.
   
   Any related issues, documentation, discussions?
   
   Closes #7454
   
   How was this PR tested?
   
   WorkflowWebsocketResourceSpec gains a case covering a session with a 
workflow attached and no execution yet, asserting the IllegalStateException, 
its message, and the WorkflowErrorEvent sent to the socket. The existing case 
with no workflow attached covers the other half of the same guard.
   
   Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code


-- 
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]

Reply via email to