Delegate RunLogsService.TailLogs to DataProxyService to remove duplicate implementation #7252#7269
Open
Carina-TzuHsuan wants to merge 1 commit into
Open
Delegate RunLogsService.TailLogs to DataProxyService to remove duplicate implementation #7252#7269Carina-TzuHsuan wants to merge 1 commit into
Carina-TzuHsuan wants to merge 1 commit into
Conversation
pingsutw
reviewed
Apr 28, 2026
pingsutw
left a comment
Member
There was a problem hiding this comment.
thank you, lgtm, could you resolve the merge conflict
…7252) Remove the duplicate K8sLogStreamer from the runs service and replace it with a thin forwarding shim that calls DataProxyService.TailLogs. The /RunLogsService/TailLogs endpoint is kept registered for backward compatibility — clients see no change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
@pingsutw Please review it. Thank you! |
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.
Remove the duplicate K8sLogStreamer from the runs service and replace it
with a thin forwarding shim that calls DataProxyService.TailLogs. The
/RunLogsService/TailLogs endpoint is kept registered for backward
compatibility — clients see no change.
Tracking issue
Closes #7252
Why are the changes needed?
RunLogsServiceandDataProxyServiceboth maintained their ownK8sLogStreamerwith 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 therepo + K8sLogStreamerimplementation with aDataProxyServiceClientfield.TailLogsnow validates the request, acquires a semaphore slot, thenforwards to
DataProxyService.TailLogsand relays responses back tothe caller.
runs/service/k8s_log_streamer.go: Deleted (duplicate removed).runs/config/config.go: AddedDataProxyServiceURLconfig field(default:
http://localhost:8088).runs/setup.go: Replaced K8s streamer wiring with aDataProxyServiceClientinjection.RunLogsServiceis now alwaysmounted unconditionally (K8s access is DataProxy's concern).
Net result: −531 lines.
How was this patch tested?
Rewrote
run_logs_service_test.gowith five test cases using a realhttptest.Serverbacked by afakeDataProxyHandler:TestTailLogs_HappyPath— response lines forwarded correctly from DataProxy to callerTestTailLogs_MissingActionID— returnsCodeInvalidArgumentTestTailLogs_DataProxyError— DataProxy error propagated to callerTestTailLogs_ConcurrencyLimit— semaphore rejects at 100 concurrent streams withCodeResourceExhaustedTestTailLogs_RequestForwardedToDataProxy—action_idandattemptforwarded unchangedLabels
Check all the applicable boxes
main