Repository navigation
Follow service logs during startup and query debugging - #47
Merged
Merged
Conversation
…284] Planned-By: codex
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.
Task
DANI-10284 — Follow service logs during startup and query debugging
Description
At origin/main 3131dd0, internal/cli/logs.go:115-139 renders one snapshot and exits; only --lines controls output. Add logs --follow to observe startup/query progress without repeatedly invoking the CLI or reconstructing service paths. Reuse existing service selection and path mapping; require no Hadoop/Hive discovery. Source-based feature gap, not a claimed runtime bug. DANI-10201 added selection/tail length and10207 optimized snapshot reads; all-status follow/streaming search found no existing coverage. Coordinate with active DANI-10280 lint cleanup using normal task selectors, not manual overlapping edits.
Acceptance Criteria
Execution Summary
Click to expand
Outcome: success
Changes:
logs --follow, which renders the existing per-file suffix first and then polls the same selected service log paths for bounded new-content chunks with source labels.Assessment: Follow state is bounded to one file identity and offset per selected log, opens files only per poll to avoid descriptor retention, and caps each read at 32 KiB.
Design weaknesses / risks:
Validation:
go test ./internal/climake testgo vet ./internal/cligit diff --check/tmp/local-data-dani-10284withgo build -o /tmp/local-data-dani-10284 ./cmd/local-data; a reallogs hive --follow --lines 1run printed initial suffixes and appended content from both Hive logs with source labels. The Go command emitted a non-fatal sandbox denial while attempting to write its module stat cache, but the build and demonstration completed successfully.Validation
Branch Freshness
origin/mainorbit/DANI-10284-6a9cd3a9