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

Implement a manual trigger for watch mode #1085

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Oct 3, 2018

One can now run skaffold dev --trigger=manual to:

  • don't poll for files changes
  • let the user press any key to then compute the diff and rebuild and redeploy what has changed.

The default trigger type is polling. Another trigger type could expose a named pipe or socket to send refresh commands.

Signed-off-by: David Gageot david@gageot.net

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

little nit, otherwise LGTM

// Trigger describes a mechanism that triggers the watch.
type Trigger interface {
Start() (<-chan bool, func())
WatchingForChanges(io.Writer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Watching -> Watch

Signed-off-by: David Gageot <david@gageot.net>
@dgageot dgageot force-pushed the manual-watch-node branch from d1634ba to 62b5ff6 Compare October 4, 2018 04:35
@codecov-io
Copy link

codecov-io commented Oct 4, 2018

Codecov Report

Merging #1085 into master will decrease coverage by 0.13%.
The diff coverage is 42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1085      +/-   ##
==========================================
- Coverage   42.57%   42.43%   -0.14%     
==========================================
  Files          71       72       +1     
  Lines        3239     3280      +41     
==========================================
+ Hits         1379     1392      +13     
- Misses       1727     1754      +27     
- Partials      133      134       +1
Impacted Files Coverage Δ
pkg/skaffold/config/options.go 81.81% <ø> (ø) ⬆️
cmd/skaffold/app/cmd/dev.go 0% <0%> (ø) ⬆️
pkg/skaffold/watch/watch.go 85% <100%> (+0.38%) ⬆️
pkg/skaffold/watch/triggers.go 27.77% <27.77%> (ø)
pkg/skaffold/runner/runner.go 53.15% <71.42%> (-0.06%) ⬇️
pkg/skaffold/runner/timings.go 15% <0%> (+0.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95df153...62b5ff6. Read the comment docs.

@dgageot dgageot merged commit 8f96420 into GoogleContainerTools:master Oct 4, 2018
@r2d4
Copy link
Contributor

r2d4 commented Oct 4, 2018

What if we had implemented manual triggering as a different watcher altogether? Since really its a keybinding watcher.

I still think you always want both at the same time

@dgageot
Copy link
Contributor Author

dgageot commented Oct 4, 2018

@r2d4 with current code, we could do both but I have no idea how that would work.

@dgageot dgageot deleted the manual-watch-node branch December 28, 2018 07:13
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.

4 participants