cloudfoundry / cloudfoundry/stratos

Log viewer retains only the newest 1000 lines — early cf push output is unrecoverable in the UI

Open
#5,537 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
267
Forks
137
Avg merge
5h 14m
Merged PRs (30d)
77

Description

Current behavior

The shared LogViewerComponent behaves as a proper circular buffer: it retains the newest maxLogLines = 1000 rendered lines (src/frontend/packages/core/src/shared/components/log-viewer/log-viewer.component.ts:89), evicting the oldest DOM node as new output arrives (binElement() removes firstChild, ~lines 362-370; hold-at-cap behavior is covered by log-viewer.component.spec.ts:86-101). Collection never stops — long streams display live output indefinitely.

Both the app Log Stream tab and the Deploy Application (cf push) step 3 panel render through this component, so both inherit the 1000-line rolling window. The backends are pure uncapped relays in both paths (src/jetstream/plugins/cloudfoundry/cf_websocket_streams.go tail/firehose handlers; src/jetstream/plugins/cfapppush/deploy.go SocketWriter.Write), so the truncation is purely client-side rendering.

Problem

1000 lines is a small window and it is not configurable. For a cf push, the earliest output (staging/buildpack detection, the first error of a failed staging) frequently scrolls out of the retained window before the push finishes, and there is no way to get it back in the UI even though the backend streamed every line.

Proposed direction (for discussion)

  • Make the retention window configurable and/or raise the default for the deploy panel.
  • And/or keep the full received text in a lightweight string buffer behind a "download full log" affordance, independent of the 1000-line DOM window (the DOM cap exists for render performance and can stay).

Found while verifying that the log paths behave as circular buffers — they do; this issue is about the window size and the unrecoverable early lines, not the ring semantics.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/frontend/packages/core/src/shared/components/log-viewer/log-viewer.component.ts:89 and the binElement() logic around lines 362-370, then read log-viewer.component.spec.ts:86-101. Trace how the app Log Stream and Deploy Application step 3 use LogViewerComponent. Done means an agreed retention or recovery behavior is implemented and covered by tests for long streams.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.