-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve and test the notify trigger #2297
Conversation
dgageot
commented
Jun 20, 2019
•
edited
Loading
edited
- Mitigate the case where we miss the first change event
- Add unit test
Gopkg.toml
Outdated
@@ -73,7 +73,8 @@ | |||
|
|||
[[constraint]] | |||
name = "github.com/rjeczalik/notify" | |||
version = "0.9.2" | |||
revision = "9ace999fc73bca667fd45dafc41356186f8b7e65" | |||
source = "https://github.com/dgageot/notify.git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here explaining what you fixed and why we're using your fork?
also, did you send a PR? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll do that! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, with the mitigation code, I might get rid of the fork!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got rid of the fork
Codecov Report
|
pkg/skaffold/watch/triggers.go
Outdated
@@ -175,8 +180,11 @@ func (t *fsNotifyTrigger) Start(ctx context.Context) (<-chan bool, error) { | |||
timer.Reset(t.Interval) | |||
case <-timer.C: | |||
trigger <- true | |||
case <-initialTimer.C: | |||
trigger <- true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we have an initialTimer.Stop() here as well to trigger it only once?
Add unit test for the notify trigger Signed-off-by: David Gageot <[email protected]>