Hey folks,
First want to say skaffold is looking great for a first release.
Second, skaffold dev is a bit too much of an overkill. What I mean by that is, a whole image build->deployment->actual application bootstrap (including bringing any external dependencies) every save doesn't seem to be optimal if the only change happened to the code (say a comment).
Ideally what should happen is:
I'm not sure there's a good solution to this problem, but would be immensely helpful and useful to have code-only updates.
skaffold version: 0.2.0
OS: OSX
K8s environ: minikube
K8s version: 1.9.x
I agree with the overkill description, it would be better to support volumes to mount the code and then just have a field of which command to trigger on any code change.
This is important because your third point will not work in a compiled language (e.g go, rust). It will work pretty well on interpreted/frontend.
Yes, we currently detect the file deltas and use that to trigger the dev cycle. Theres a few places where we could immediately improve using this metadata. A few off the top of my head.
Yeah, a few possible ideas on the "magic" aspect.
If there is a change in a file that has no "run" commands (or onbuild run) after it, it should be safe to skip the rebuild and do a sync/restart in place.
If we had a way to tell what files are looked at during a run command (ptrace?), we could potentially skip even more rebuilds.
We use skaffold for java projects. The Dockerfile copies the bootable jar into the image. Therefor deploying on code changes does not have any effect (it deploys the same old jar over again). It would be nice to just watch the output dir for new jar files. So being able to specify a watchpath would be nice.
This looks promising https://github.com/vapor-ware/ksync
cc @pquerna
Closing this, as this issue is covered by the following issues:
Most helpful comment
Yes, we currently detect the file deltas and use that to trigger the dev cycle. Theres a few places where we could immediately improve using this metadata. A few off the top of my head.