Skip to content

UI generates excessive GET task/.../context requests #7770

@DavidePrincipi

Description

@DavidePrincipi

The UI issues a large number of GET task/.../context requests while an action is running. The problem is visible with any action that emits progress events.

Steps to reproduce

  1. Create a custom action that emits frequent progress updates:

     mkdir /var/lib/nethserver/cluster/actions/progress-bug
     cat > /var/lib/nethserver/cluster/actions/progress-bug/10genprog <<'EOF'
     #!/bin/bash
     for i in $(seq 0 100); do
         echo set-progress $i >&3
         sleep 0.2
     done
     EOF
     chmod +x /var/lib/nethserver/cluster/actions/progress-bug/10genprog
    
  2. Run the action:

     api-cli run progress-bug
    
  3. Observe the browser DevTools: the UI generates a storm of GET task/.../context requests during the progress loop.

Expected behavior

The UI should not issue excessive polling requests for task context updates.

Actual behavior

The UI continuously sends GET requests for the task context, causing unnecessary load during actions that emit many progress events.

See also

Discussion https://mattermost.nethesis.it/nethesis/pl/fds4djs66bdydcxaojowc1msdy

Metadata

Metadata

Assignees

No one assigned

    Labels

    verifiedAll test cases were verified successfully

    Type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions