You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Blocking wait for "Terminated" state Ready Condition #739
The user may configure the ReadyCondition is process_state = "Terminated" which means the component is ready if the process terminated.
Currently, this is implemented by evaluating the ReadyCondition when the OShandler reports the termination.
Once the process reaches the Running state, the ProcesssInfoNode gives up the worker thread.
This is different compared to how process_state = "Running" ready condition is implemented, which is blocking the worker thread until either the timeout is reached or Running state is reported.
Problem
This ReadyCondition for Terminated state is not guarded by the ready timeout parameter (as is the case for process_state = "Running" ready condition).
It is difficult to make the timeout work while keeping the asynchronous execution in place as we do not have any machinery for asynchronous timeout tracking.
As a result, the current implementation may wait forever if the process does not terminate. The component will never become ready. As we also lack a transition timeout, this is error is currently only recovered by StateManager requesting a different RunTarget
Acceptance Criteria (DoD)
When ReadyCondition process_state=Terminated is configured, ProcessInfoNode waits until either the ready timeout is over or the process has terminated
If the process does not terminate within the configured ready timeout, it is treated the same as kRunning timeout
How
Use the same mechanism for the "Terminated" ReadyCondition as for the "Running" ReadyCondition. We block the worker thread until either the ready timeout is reached or the process has Terminated. Although less resource efficient, it resolves a critical error case. This can be improved later with more sophisticated asynchronous timeout handling.
Note: The ReadyTimeout must be started with the process start and covers the time it takes to reach Running state and Terminated process state.
Activity