Repository navigation
fix: exclude current logs that start after requested range - #1273
Merged
Merged
Conversation
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.
Fixes #1272.
A current Observer or OBProxy log can be collected for an earlier requested interval when rotation history is missing, or when a restart creates a gap after the last surviving rotation. For example, a current file whose first entry is at 12:00 is currently selected for a 10:00–10:05 query if no rotated files are available.
Use the first entry's timestamp to refine the start of each current file that remains a candidate after rotation-based filtering. Exclude the file when that start is later than
--to, preserving fractional seconds. Quote the remote file path using the existing path helper. If the first line is unreadable or unrecognized, keep the existing conservative rotation-based estimate. Rotated/compressed selection and--recent_countbehavior remain unchanged; overlapping files are still collected whole.Update the
gather log,gather obproxy_log, andgather allhelp to explain whole-file selection and the fallback for unknown current-log start times.Validation:
4fda792168e297ed4ec543a2aea7e5ff84e4e65cusing a temporary log directory and the realLocalClientdiscovery path, without a running database.--recent_count.python -m pytest test/common/test_gather_log_time_filter.py test/common/test_log_filter.py -q— 35 tests and 55 subtests passed on Python 3.14.python -m pytest test/common/test_*.py -q— 134 tests and 75 subtests passed; two existing deprecation warnings.black --check -S -l 256 .passed for all 446 files.git diff --checkpassed.No live remote-node SSH validation was performed. The format-check environment fix is submitted separately in #1271; this PR contains no workflow changes.