Skip to content

Conversation

@twz123
Copy link
Member

@twz123 twz123 commented Sep 22, 2025

Description

Decouple the stack application from the fsnotify watcher loop. This prevents the loop from stalling due to a long-running application and reduces the risk of the operating system buffer getting overflowed. Trigger applications via a separate channel with a buffer size of one item. This naturally implements debouncing.

Fixes:

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@twz123 twz123 linked an issue Sep 22, 2025 that may be closed by this pull request
@twz123 twz123 marked this pull request as ready for review September 22, 2025 15:02
@twz123 twz123 requested review from a team as code owners September 22, 2025 15:02
@github-actions
Copy link
Contributor

The PR is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Oct 22, 2025
@twz123 twz123 force-pushed the debouncer-separate-apply branch from fa2f682 to 7588f68 Compare October 23, 2025 20:15
Decouple the stack application from the fsnotify watcher loop. This
prevents the loop from stalling due to a long-running application and
reduces the risk of the operating system buffer getting overflowed.
Trigger applications via a separate channel with a buffer size of one
item. This naturally implements debouncing.

Fixes a panic that could occur when the Run method exits before the
initial apply event has been sent from the separate goroutine.

Signed-off-by: Tom Wieczorek <[email protected]>
@twz123 twz123 force-pushed the debouncer-separate-apply branch from 7588f68 to 2656726 Compare October 23, 2025 20:34
@github-actions github-actions bot removed the Stale label Oct 23, 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.

Panic in applier unit tests: DATA RACE / send on closed channel

1 participant