This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Correct Logging#215
Merged
Merged
Conversation
aa88e83 to
3013e95
Compare
cea3226 to
0ec1e75
Compare
This PR elmintes the utils package by moving the functionality to where
it is used. This is more in-line with idiomatic go (no non-descriptive
package names). As part of the elimination we moved to a custom slice
for logs that elminates the majority of the Custom Marshal/Unmarshal
code.
Identified in this change, the metrics emission was no longer wired up
and has been restored to functionality.
Key improvements:
- Introduce LogsSlice type with proper JSON marshaling/unmarshaling
- Implements Stringer interface for consistent log formatting
- Handles newline-delimited string conversion automatically
- Eliminates need for custom PredictionResponse marshal/unmarshal
- Move metrics functionality from dead util/metrics.go to runner.go
- Restore sendRunnerMetric() function that was never called
- Inline HTTPClientWithRetry() using httpclient.ApplyRetryPolicy
- Fix missing imports and undefined references
- Remove util.JoinLogs() dependency by using LogsSlice.String()
- Consolidate logging utilities into appropriate packages
Technical details:
- LogsSlice.String() preserves util.JoinLogs() behavior (joins with \n, ensures trailing \n)
- LogsSlice.MarshalJSON/UnmarshalJSON handles string ↔ []string conversion
- All util package imports removed across codebase
- Metrics sending now properly integrated into runner lifecycle
This eliminates the "terrible util package" while restoring previously
broken metrics functionality and improving type safety for log handling.
fc85e3b to
22c158d
Compare
0ec1e75 to
f9009b9
Compare
The mirror logging to stdout/err was including the context prefix from python of `[pid=<prediction_id]` this PR eliminates that problem and restores proper logging to console.
f9009b9 to
a9f8075
Compare
meatballhat
previously approved these changes
Sep 16, 2025
The base branch was changed.
meatballhat
approved these changes
Sep 16, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The mirror logging to stdout/err was including the context prefix from python of
[pid=<prediction_id]this PR eliminates that problem and restores proper logging to console.