Repository navigation
Description
What happened?
The frontend learns that a run has ended only from the engine, over the selected unit's websocket. When the selected unit is terminated from the unit dropdown, or drops out of the unit list, while a run is in flight, that message never arrives and nothing resets the execution state. The run keeps being reported as running:
- The canvas Kill button stays enabled, but clicking it does nothing.
- The run clock keeps counting.
- Form View keeps saying "Running -- this keeps going if you look away." (
workflow-form.component.html:399). - The execution state stays Running, which keeps the canvas locked.
Nothing resets the execution when the selection is cleared. ComputingUnitStatusService.setComputingUnitsState sets the selection to null when the unit leaves the list (computing-unit-status.service.ts:111-125), and terminateComputingUnit closes the websocket itself (:293-299), but neither emits anything ExecuteWorkflowService listens to.
The Kill button stays enabled because its gate exempts NoComputingUnit from the socket check:
<!-- frontend/src/app/workspace/component/menu/menu.component.html:430-439 -->
<button
(click)="handleKill()"
[disabled]="
executionState === ExecutionState.Uninitialized ||
executionState === ExecutionState.Completed ||
executionState === ExecutionState.Killed ||
executionState === ExecutionState.Failed ||
(!workflowWebsocketService.isConnected &&
computingUnitStatus !== ComputingUnitState.NoComputingUnit)
"#3400 (a910bcf) added the socket check to Kill together with this exemption, copying the Run button's translation of the old single-mode flag !environment.computingUnitManagerEnabled; that mode no longer exists. After a dropdown terminate the websocket subject is already completed, so the kill request is simply dropped.
Reproduced in Chrome with a local unit. Running, before the terminate:
After terminating the selected unit from the dropdown and clicking Kill:
How to reproduce?
- Workflow: Text Input -> Python UDF whose
process_tupledoestime.sleep(900). - Select a unit, click Run, and wait until the UDF operator is running.
- Open the unit dropdown, click the trash icon of the selected unit, and confirm.
- Kill stays enabled and clicking it does nothing; the clock keeps counting; Form View keeps saying "Running".
Version/Branch
1.4.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
No response
What browsers are you seeing the problem on?
No response
Activity
fix(frontend): reset the run state when its unit is lost (#8936)
feat(amber): close executions at the Dashboard service