-
Notifications
You must be signed in to change notification settings - Fork 60
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
[FEATURE] filepath sync to poll version, in addition to using fsnotify #1344
Labels
Comments
djosephsen
added a commit
to djosephsen/flagd
that referenced
this issue
Jul 22, 2024
Implement fsnotify and `os.Stat` based watchers fixes: open-feature#1344 Signed-off-by: Dave Josephsen <[email protected]>
djosephsen
added a commit
to djosephsen/flagd
that referenced
this issue
Jul 30, 2024
Implement fsnotify and `os.Stat` based watchers fixes: open-feature#1344 Signed-off-by: Dave Josephsen <[email protected]>
djosephsen
added a commit
to djosephsen/flagd
that referenced
this issue
Aug 14, 2024
Implement fsnotify and `os.Stat` based watchers fixes: open-feature#1344 Signed-off-by: Dave Josephsen <[email protected]>
toddbaert
added a commit
to open-feature/community
that referenced
this issue
Aug 14, 2024
@djosephsen has been helping with flagd features, specifically open-feature/flagd#1344 Signed-off-by: Todd Baert <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirements
Until now, we've been using fsnotify for watching files for change. This works well in K8s and most "prod" situations.
Unfortunately, due to the complexities and inconsistencies across OSes and editors, this simply doesn't work well in many developer cases, and even some prod cases (OSes and editors all send different combinations of events, some create temp files and move them, some use symlinks, etc, etc).
It's unreasonable to support all these different situations. I propose we add an additional mode or version of the filepath Sync to start a goroutine which uses
os.Stat()
to get thefs.FileInfo
, noting the current time (time
) and then we checkfileInfo.ModTime().After(time)
everyn
seconds and fire a sync event with new contents if we see it's changed. I think by default,n
should be 1000ms, but it should be configurable. We could use some kind of startup param to select this mode and the poll internal.cc @Kavindu-Dodan
The text was updated successfully, but these errors were encountered: