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
A workflow whose last computing unit was terminated opens with no unit selected #8933
When a workflow opens, ComputingUnitSelectionComponent.selectInitialUnit restores a unit in this order: the unit remembered for the workflow if it is still listed, else the unit of the workflow's last execution, else the first Running unit when the workflow has never run. The remembered-unit step checks the unit list first (computing-unit-selection.component.ts:368-397). The last-execution step does not:
/api/executions/{wid}/latest also returns terminated units. For such a unit, ComputingUnitStatusService.selectComputingUnit misses its cache, refreshes the list and waits for that cuid to appear (computing-unit-status.service.ts:193-205), which never happens. The workflow opens with no unit selected and the run button reads "Computing Unit", even while another unit is Running. The fallback to a Running unit runs only when the lookup fails, so it never helps here.
That fallback reads allComputingUnits synchronously, so for a workflow that has never run it also selects nothing when the unit list has not loaded yet.
Reproduced in Chrome with local units. The workflow last ran on "Analytics Unit":
After terminating "Analytics Unit" and reloading, "My Computing Unit" is Running but nothing is selected:
How to reproduce?
Create two local computing units; both are Running.
Open a workflow, select unit A, run it, and wait for it to complete.
Terminate unit A from the unit dropdown.
Reload the workflow. No unit is selected, although unit B is Running.
Activity
fix(frontend): fall back to a running unit on workflow load (apache#8935