Workflow page stays on "Stop" after a Run once

After a Run once, the workflow overview page can keep showing Stop / Force Stop although the workflow is no longer deployed. A page reload shows the right state.

Steps to reproduce

  1. Open the overview page of a workflow whose trigger is "Run once" (e.g. "Print env").
  2. Click Deploy.
  3. Wait for the run to finish (a few seconds).

What is the current bug behavior and the expected correct behavior?

  • Current: the buttons stay on "Stop / Force Stop". It happened in 4 of 5 tries on staging rc6, and once it was still wrong 40 s later.
  • Expected: the page goes back to "Deploy" when the run-once deployment stops by itself.

Relevant logs and/or screenshots

Studio reports Deployed for about 1 s before the run-once deployment stops. The front stops polling as soon as it sees Deployed, so it never sees the stop.

Staging, 26.10.0-rc6, workflow "Print env". Found while testing #1485 (closed).

Possible fixes

In apps/ryax/src/app/modules/workflow/state/effects/workflow.effects.ts, workflowRefresh$ only keeps polling while the status is Deploying or Undeploying. Keep polling while Deployed too, less often (every 5 s), until the user leaves the page.