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

[file] rotator purge fix #156

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

leehinman
Copy link
Contributor

What does this PR do?

In file daily rotator. Previously files that matched the Glob filenamePrefix* were considered rotated files. This change makes it filenamePrefix*.extension.

Why is it important?

With the previous code, files that started with the prefix but ended with a different extension could be considered rotated files and thus available to be purged. For example elastic-agent-diagnostics.zip would be considered a rotated file if the filename prefix was elastic-agent-

Adding the the extension keeps those files from being considered rotated files, and thus out of the list of files that are eligible to be purged.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.md

Author's Checklist

  • [ ]

Related issues

only include files for consideration of purging that include the
extension
@leehinman leehinman added bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Oct 23, 2023
@leehinman leehinman requested a review from a team as a code owner October 23, 2023 17:52
@leehinman leehinman requested review from ycombinator and fearful-symmetry and removed request for a team October 23, 2023 17:52
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@leehinman leehinman requested review from belimawr and removed request for ycombinator October 24, 2023 20:59
@leehinman leehinman merged commit 734f0e1 into elastic:main Oct 25, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 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.

Collected diagnostics zip gets removed itself when logging level is set to debug for Windows agent.
3 participants