acoustic-carpenter-78188
04/23/2026, 9:50 PMRunLogsService and DataProxyService both maintained their own
K8sLogStreamer with nearly identical logic for streaming pod logs.
This duplicated maintenance burden — any fix to log streaming had to be
applied in two places.
What changes were proposed in this pull request?
• runs/service/run_logs_service.go: Replaced the repo + K8sLogStreamer implementation with a DataProxyServiceClient field.
TailLogs now validates the request, acquires a semaphore slot, then
forwards to DataProxyService.TailLogs and relays responses back to
the caller.
• runs/service/k8s_log_streamer.go: Deleted (duplicate removed).
• runs/config/config.go: Added DataProxyServiceURL config field
(default: `http://localhost:8088`).
• runs/setup.go: Replaced K8s streamer wiring with a
DataProxyServiceClient injection. RunLogsService is now always
mounted unconditionally (K8s access is DataProxy's concern).
Net result: −531 lines.
How was this patch tested?
Rewrote run_logs_service_test.go with five test cases using a real
httptest.Server backed by a `fakeDataProxyHandler`:
• TestTailLogs_HappyPath — response lines forwarded correctly from DataProxy to caller
• TestTailLogs_MissingActionID — returns CodeInvalidArgument
• TestTailLogs_DataProxyError — DataProxy error propagated to caller
• TestTailLogs_ConcurrencyLimit — semaphore rejects at 100 concurrent streams with CodeResourceExhausted
• TestTailLogs_RequestForwardedToDataProxy — action_id and attempt forwarded unchanged
Labels
• removed: duplicate K8sLogStreamer deleted from runs service
• changed: RunLogsService now delegates to DataProxyService
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
---
• main
• #6583
• Delegate RunLogsService.TailLogs to DataProxyService to remove duplicate implementation #7252 👈
flyteorg/flyte