Skip to content

Conversation

@cmraible
Copy link
Collaborator

@cmraible cmraible commented Oct 23, 2025

The FileSaltStore tests are flaky, particularly the 'should work correctly with multiple instances using same file' test. It turns out, the flakiness is from the FileSaltStore's implementation, not the test itself.

When two instances of the service attempt to use the same file, they can experience a race condition when trying to initialize or write to the file. This fixes this by using a proper lockfile mechanism with the proper-lockfile package.

@cmraible cmraible changed the title Fix file salt store multi instance Added proper file locking to FileSaltStore Oct 23, 2025
@cmraible cmraible force-pushed the fix-file-salt-store-multi-instance branch from c917e3e to 185cf2b Compare October 23, 2025 23:54
@cmraible cmraible marked this pull request as ready for review October 24, 2025 00:19
@cmraible cmraible requested a review from 9larsons as a code owner October 24, 2025 00:19
@cmraible cmraible changed the title Added proper file locking to FileSaltStore Added proper file locking to FileSaltStore Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant