-
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
Dev build cleanup deletes all layers #2050
Comments
The quick fix for you would be to use I was digging in to the cleanup code and i think that is the intended behaviour. e.g.
So your workflow would be:
Does that help? |
skaffold does its pruning through the I don't think we want to turn this off by default, but we could expose pruning options through the config - for your specific case, setting would you be interested in sending a PR for this? |
@nkubala I'm interested in sending a PR, if that's OK 😄 |
@charlyx that would be great! |
closed through #2113 |
Expected behavior
Skaffold dev should only cleanup layers it created.
Actual behavior
Skaffold dev cleans up all layers for a given image (even layers that already existed before it started).
For example, if I run skaffold run once, then run skaffold dev to start developing my application, and later hit control-c to stop the process, skaffold deletes all layers of the image it used, even the layers it didn't build (ex: layers that were built during skaffold run).
My current workflow is to run
skaffold dev
to develop my application, and use control-c when I am done working on it for the time being. I then resume withskaffold dev
again the next day. This used to start the application in a few seconds (since the previous layers already existed). Now it results in 5 - 10 minutes of build time since it has to rebuild a multi-gigabit docker image.I believe we should either:
Information
Steps to reproduce the behavior
skaffold run
once (to build and deploy an app)skaffold dev
skaffold dev
skaffold dev
againThe text was updated successfully, but these errors were encountered: