Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out duplicate paths resolved from matching globs #36256

Merged
merged 2 commits into from Aug 8, 2023

Conversation

rdner
Copy link
Member

@rdner rdner commented Aug 8, 2023

Multiple globs can resolve in duplicate filenames. These duplicates must be filtered out even before they reach the creation of file descriptors and additional checks, otherwise this causes a flood of warning messages in logs.

These warnings should catch only the cases when symlinks are resolved in known filenames.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

The new test was failing before the fix with this message:

Screenshot 2023-08-08 at 09 49 29

Related issues

Multiple globs can resolve in duplicate filenames. These duplicates
must be filtered out even before they reach the creation of file descriptors
and additional checks, otherwise this causes a flood of warning
messages in logs.

These warnings should catch only the cases when symlinks are
resolved in known filenames.
@rdner rdner added bug Filebeat Filebeat Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-v7.17.0 Automated backport with mergify backport-v8.9.0 Automated backport with mergify labels Aug 8, 2023
@rdner rdner self-assigned this Aug 8, 2023
@rdner rdner requested a review from a team as a code owner August 8, 2023 07:58
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 8, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 8, 2023
@pierrehilbert
Copy link
Collaborator

We didn't backport the fingerprint to 8.9 so I don't think we should backport this one.

@rdner rdner removed the backport-v8.9.0 Automated backport with mergify label Aug 8, 2023
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 8, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-08T08:01:20.857+0000

  • Duration: 74 min 45 sec

Test stats 🧪

Test Results
Failed 0
Passed 8132
Skipped 755
Total 8887

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@rdner rdner requested a review from ycombinator August 8, 2023 09:26
@rdner rdner enabled auto-merge (squash) August 8, 2023 09:58
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this!

@rdner rdner merged commit 4d0276a into elastic:main Aug 8, 2023
26 checks passed
mergify bot pushed a commit that referenced this pull request Aug 8, 2023
Filter out duplicate paths resolved from matching globs

Multiple globs can resolve in duplicate filenames. These duplicates
must be filtered out even before they reach the creation of file descriptors
and additional checks, otherwise this causes a flood of warning
messages in logs.

These warnings should catch only the cases when symlinks are
resolved in known filenames.

(cherry picked from commit 4d0276a)
@rdner rdner deleted the fix-fswatcher-duplicate-warnings branch August 8, 2023 16:36
rdner added a commit that referenced this pull request Aug 8, 2023
…hing globs (#36264)

Filter out duplicate paths resolved from matching globs (#36256)

Multiple globs can resolve in duplicate filenames. These duplicates
must be filtered out even before they reach the creation of file descriptors
and additional checks, otherwise this causes a flood of warning
messages in logs.

These warnings should catch only the cases when symlinks are
resolved in known filenames.

(cherry picked from commit 4d0276a)

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
Filter out duplicate paths resolved from matching globs

Multiple globs can resolve in duplicate filenames. These duplicates
must be filtered out even before they reach the creation of file descriptors
and additional checks, otherwise this causes a flood of warning
messages in logs.

These warnings should catch only the cases when symlinks are
resolved in known filenames.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.17.0 Automated backport with mergify bug Filebeat Filebeat Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle the edge case when several globs in Filebeat path match
4 participants