Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Aug 21, 2025

What does this PR do?

This PR retries saving the Agent information file, fleet.enc, on Windows. The retries are done every 50ms for up to 2 seconds.

Why is it important?

Saving the Agent information file involves renaming/moving a file to its final destination. However, on Windows, it is sometimes not possible to rename/move a file to its destination file because the destination file is locked by another process (e.g. antivirus software). For such situations, we now retry the save operation on Windows.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • 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/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None.

Related issues

* Retry saving Agent information file on Windows

* Implement retries on saving fleet.enc file

* Remove previous implementation

* Adding CHANGELOG file

* Running mage fmt

* Remove unnecessary changes

(cherry picked from commit ead9249)
@mergify mergify bot requested a review from a team as a code owner August 21, 2025 00:03
@mergify mergify bot added the backport label Aug 21, 2025
@mergify mergify bot requested review from michalpristas and removed request for a team August 21, 2025 00:03
@mergify mergify bot requested a review from blakerouse August 21, 2025 00:03
@ycombinator ycombinator enabled auto-merge (squash) August 21, 2025 00:21
@elastic-sonarqube
Copy link

@ycombinator ycombinator merged commit 906b41c into 8.17 Aug 21, 2025
20 checks passed
@ycombinator ycombinator deleted the mergify/bp/8.17/pr-9224 branch August 21, 2025 01:27
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

cc @ycombinator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants