[logptest] Fix Logger.FindInLogs handling of partial lines#388
Merged
belimawr merged 2 commits intoelastic:mainfrom Mar 2, 2026
Merged
[logptest] Fix Logger.FindInLogs handling of partial lines#388belimawr merged 2 commits intoelastic:mainfrom
belimawr merged 2 commits intoelastic:mainfrom
Conversation
When Logger.FindInLogs read a partial line (EOF reached before reading
EOL ('\n')) the offset would be updated, this could cause some strings
never to be matched because they had been partially read.
This commit fixes it by only advancing the offset if a full line has
been read.
GenAI-Assisted: Yes
Human-Reviewed: Yes
Tool: GitHub Copilot CLI, Model: GPT-5.3 Codex
GenAI-Assisted: Yes Human-Reviewed: Yes Tool: GitHub Copilot CLI, Model: GPT-5.3 Codex
Collaborator
💚 Build Succeeded
cc @belimawr |
cmacknz
reviewed
Feb 27, 2026
cmacknz
approved these changes
Feb 27, 2026
Member
cmacknz
left a comment
There was a problem hiding this comment.
This looks fine but the reason it happened seems to be that we have chosen the hard way to implement this and it would be nice to change that.
AndersonQ
approved these changes
Mar 2, 2026
mauri870
approved these changes
Mar 2, 2026
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.
What does this PR do?
Why is it important?
It fixes a bug: elastic/beats#49144
Checklist
## Author's ChecklistRelated issues
missing 'file is inactive' logsbeats#49144