Skip to content

A workflow whose last computing unit was terminated opens with no unit selected #8933

Closed

Description

@eugenegujing

What happened?

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:

// frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts:412-425
        next: (latestWorkflowExecution: WorkflowExecutionsEntry) => {
          if (stillShown()) {
            if (selectUnit) {
              this.selectComputingUnit(wid, latestWorkflowExecution.cuId);
            }
            this.lastExecutionWhid = latestWorkflowExecution.whId ?? undefined;
            this.applyWarehousePreselect();
          }
        },
        error: () => {
          const runningUnit = this.allComputingUnits.find(unit => unit.status === "Running");
          if (selectUnit && stillShown() && runningUnit) {
            this.selectComputingUnit(wid, runningUnit.computingUnit.cuid);
          }

Two defects follow:

  • /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":

Image

After terminating "Analytics Unit" and reloading, "My Computing Unit" is Running but nothing is selected:

Image

How to reproduce?

  1. Create two local computing units; both are Running.
  2. Open a workflow, select unit A, run it, and wait for it to complete.
  3. Terminate unit A from the unit dropdown.
  4. Reload the workflow. No unit is selected, although unit B is Running.

Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

No response

What browsers are you seeing the problem on?

No response

Relevant log output

Activity

  1. added theissue type on Oct 9, 2026
  2. added a commit that references this issue on Oct 27, 2026
    a40d1ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions