Skip to content

fix: replace process log SSE with incremental polling#1040

Merged
milkway merged 1 commit into
mainfrom
codex/issue-1039-process-log-polling
Jul 22, 2026
Merged

fix: replace process log SSE with incremental polling#1040
milkway merged 1 commit into
mainfrom
codex/issue-1039-process-log-polling

Conversation

@milkway

@milkway milkway commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Closes #1039.

Root cause

The process Logs page automatically held an infinite EventSource response open. In the production path, the load balancer talks HTTP/1.1 to nginx; a stale/reused backend connection could retain that response and head-of-line block a later admin navigation, which explains the UI hanging after several tab changes.

What changed

  • replace the automatic process-log SSE feed with finite cursor-based polling
  • capture the initial tail and cursor under one lock so no line can fall between the server render and first poll
  • stop polling while paused or hidden, prevent overlapping requests, and retry with bounded backoff
  • return 204 No Content from the legacy stream route so pre-deploy EventSource clients stop reconnecting during rollout
  • preserve admin-only access and add regression coverage for cursor handoff, response shape, caching, legacy shutdown, and RBAC

Container-log live follow remains explicitly user-activated, and image-pull event streams remain finite.

Validation

  • DOCKER_REGISTRY_PASSWORD=test cargo test -p ruscker-admin
  • DOCKER_REGISTRY_PASSWORD=test cargo clippy --all-targets -- -D warnings
  • ./scripts/i18n-check.sh
  • git diff --check

@milkway
milkway merged commit 1230981 into main Jul 22, 2026
5 checks passed
@milkway
milkway deleted the codex/issue-1039-process-log-polling branch July 22, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin trava ('carregando') com múltiplas abas abertas — esgotamento do pool HTTP/1.1 por ≥6 SSE seguradas (imune em HTTP/2)

1 participant