fix(file): rotate active file if it points to a symbolic link#274
Merged
mauri870 merged 8 commits intoelastic:mainfrom Feb 20, 2025
Merged
fix(file): rotate active file if it points to a symbolic link#274mauri870 merged 8 commits intoelastic:mainfrom
mauri870 merged 8 commits intoelastic:mainfrom
Conversation
Member
Author
|
Leaving as draft for now, I need to trigger a beats test run with this commit to make sure nothing broke. |
61807da to
c4fd1bd
Compare
c4fd1bd to
a202d20
Compare
Member
Author
|
I tested with the beats file output and logger output, seems to be working as intended. |
Member
Author
|
Friendly ping for a review, thanks in advance! |
Collaborator
💚 Build Succeeded
History
cc @mauri870 |
VihasMakwana
approved these changes
Feb 18, 2025
Member
Author
|
@cmacknz I requested a review from you, since you are more familiar with the discussion around this. Appreciate if you can do a quick review. Thanks! Edit: I recall that you already approved these changes in another discussion. |
faec
approved these changes
Feb 18, 2025
cmacknz
reviewed
Feb 25, 2025
| // could be a sensitive or protected file not owned by us. | ||
| if isSymlink { | ||
| if r.log != nil { | ||
| r.log.Debugw("Active file is a symlink, forcing rotation", "filename", r.rot.ActiveFile()) |
Member
There was a problem hiding this comment.
Making this a debug log means almost no one will see it, I would have preferred a warning I think, since this is an indicator something questionable has happened.
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?
This PR changes the file rotation logic of the file package to force a rotation if the active file is a symlink.
Related issues