fix: workload log streaming follows pod rollouts#375
Merged
nadaverell merged 1 commit intomainfrom Mar 28, 2026
Merged
Conversation
During a deployment rollout, the workload log viewer would sometimes show "No logs available" because: 1. The frontend removed terminated pods from the selected filter, hiding all existing log entries before new pod logs arrived 2. The backend never retried failed log streams — if a new pod wasn't ready when first discovered, its stream silently failed and was never restarted Frontend now handles pod_added/pod_removed SSE events (already sent by backend but previously ignored), keeps old log entries visible during transitions, and auto-selects new pods. Backend now retries stream connections for all current pods on each discovery tick, with a retry limit of 5 attempts per pod/container to avoid unbounded retries for permanently broken pods. Closes #355
782f4a0 to
89d22b4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
During a deployment rollout, the workload log viewer would sometimes show "No logs available" after pods rolled over. Two independent bugs:
pod_addedandpod_removedSSE events (already sent by the backend) were never listened to. When the old pod terminated, its log entries were filtered out before new pod logs arrived — leaving the viewer empty.streamPodLogsfailed and was never retried — the pod was already inknownPodsso future ticks skipped it.Changes
useLogStream.ts: Addedpod_added/pod_removedevent listeners with optional callbacksWorkloadLogsViewer.tsx: Handles pod lifecycle events — adds new pods to the filter and auto-selects them; keeps old log entries visible during transitionsworkload_logs.go: Discovery tick now callsstartPodStreamsfor all current pods (not just new ones), safely retrying failed streams since the function already skips active onesCloses #355