Skip to content
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

Merged
merged 1 commit into from
Jun 22, 2019

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Jun 20, 2019

  • 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"
Copy link
Contributor

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? :)

Copy link
Contributor Author

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!

Copy link
Contributor Author

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!

Copy link
Contributor Author

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
Copy link

codecov bot commented Jun 21, 2019

Codecov Report

Merging #2297 into master will increase coverage by 0.2%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/watch/triggers.go 63.44% <100%> (+17.78%) ⬆️

@@ -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
Copy link
Contributor

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]>
@dgageot dgageot merged commit cb28fbd into GoogleContainerTools:master Jun 22, 2019
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.

4 participants