-
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
Checking cache takes ages and rebuilds the whole image after each change #5499
Comments
It sync'd for me out of the box (
What files did you edit? Is it possible that your editor is placing temp files alongside the file being edited? These temp files can lead to rebuilds. |
I forgot to add that checking the cache is fast for me:
Could you please try running with |
Hello , I was changing This is what happens when I start the project with C:\Users\Sin\Desktop\sin-food>skaffold dev -vdebug
time="2021-03-08T16:51:33+02:00" level=info msg="starting gRPC server on port 50051"
time="2021-03-08T16:51:33+02:00" level=info msg="starting gRPC HTTP server on port 50052"
time="2021-03-08T16:51:33+02:00" level=info msg="Skaffold &{Version:v1.20.0 ConfigVersion:skaffold/v2beta12 GitVersion: GitCommit:c48e97690d8daffd68141c2a68fcbe3df6f6936a GitTreeState:dir
ty BuildDate:2021-02-11T22:56:45Z GoVersion:go1.14.14 Compiler:gc Platform:windows/amd64}"
time="2021-03-08T16:51:33+02:00" level=debug msg="Update check not enabled, skipping."
time="2021-03-08T16:51:33+02:00" level=info msg="Loaded Skaffold defaults from \"C:\\\\Users\\\\Sin\\\\.skaffold\\\\config\""
time="2021-03-08T16:51:33+02:00" level=debug msg="could not parse date \"\""
time="2021-03-08T16:51:33+02:00" level=debug msg="config version out of date: upgrading to latest \"skaffold/v2beta12\""
time="2021-03-08T16:51:33+02:00" level=debug msg="parsed 1 configs from configuration file C:\\Users\\Sin\\Desktop\\sin-food\\skaffold.yaml"
time="2021-03-08T16:51:33+02:00" level=info msg="Using kubectl context: docker-desktop"
time="2021-03-08T16:51:33+02:00" level=debug msg="setting Docker user agent to skaffold-v1.20.0"
time="2021-03-08T16:51:33+02:00" level=debug msg="Using builder: local"
Listing files to watch...
- isengart/food-user
time="2021-03-08T16:51:33+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:33+02:00" level=debug msg="Skipping excluded path: node_modules"
- isengart/food-restaurant
time="2021-03-08T16:51:33+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:33+02:00" level=debug msg="Skipping excluded path: node_modules"
- isengart/food-menu
time="2021-03-08T16:51:33+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:33+02:00" level=debug msg="Skipping excluded path: node_modules"
- isengart/food-order
time="2021-03-08T16:51:33+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:33+02:00" level=debug msg="Skipping excluded path: node_modules"
- isengart/food-notification
time="2021-03-08T16:51:33+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:33+02:00" level=debug msg="Skipping excluded path: node_modules"
- isengart/food-client
time="2021-03-08T16:51:33+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:41+02:00" level=info msg="List generated in 7.836 seconds"
Generating tags...
- isengart/food-user -> time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git describe --tags --always]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git describe --tags --always]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git describe --tags --always]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git describe --tags --always]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git describe --tags --always]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git describe --tags --always]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: [5192c74\n]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: [5192c74\n]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: [5192c74\n]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: [5192c74\n]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: [5192c74\n]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: [5192c74\n]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git status . --porcelain]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git status . --porcelain]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git status . --porcelain]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git status . --porcelain]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git status . --porcelain]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Running command: [git status . --porcelain]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: []"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: []"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: []"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: []"
time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: []"
isengart/food-user:5192c74
- isengart/food-restaurant -> isengart/food-restaurant:5192c74
- isengart/food-menu -> time="2021-03-08T16:51:41+02:00" level=debug msg="Command output: []"
isengart/food-menu:5192c74
- isengart/food-order -> isengart/food-order:5192c74
- isengart/food-notification -> isengart/food-notification:5192c74
- isengart/food-client -> isengart/food-client:5192c74
time="2021-03-08T16:51:41+02:00" level=info msg="Tags generated in 160.9964ms"
Checking cache...
time="2021-03-08T16:51:41+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Skipping excluded path: node_modules"
time="2021-03-08T16:51:41+02:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true} {. /app true}]"
time="2021-03-08T16:51:41+02:00" level=debug msg="Skipping excluded path: node_modules"
time="2021-03-08T16:51:41+02:00" level=debug msg="Skipping excluded path: node_modules"
time="2021-03-08T16:51:41+02:00" level=debug msg="Skipping excluded path: node_modules"
time="2021-03-08T16:51:41+02:00" level=debug msg="Skipping excluded path: node_modules"
time="2021-03-08T16:57:35+02:00" level=debug msg="Could not import artifact from Docker, building instead (import of missing images disabled)"
- isengart/food-user: Found. Tagging
- isengart/food-restaurant: Found. Tagging
- isengart/food-menu: Found. Tagging
- isengart/food-order: Found. Tagging
- isengart/food-notification: Found. Tagging
- isengart/food-client: Not found. Building
time="2021-03-08T16:57:35+02:00" level=info msg="Cache check completed in 5 minutes 53.973 seconds"
Found [docker-desktop] context, using local docker daemon.
Building [isengart/food-client]...
time="2021-03-08T16:57:35+02:00" level=debug msg="Running docker build: context: client, dockerfile: Dockerfile"
Sending build context to Docker daemon 370MB
The issue seems to be this After the image rebuilt , I stopped skaffold with Lastly it seems that I currently have ~ 70 images of the food-client locally all generated from skaffold. Is this a normal behavior ? I'm really sorry if I do any silly questions I'm really new with Docker/K8s/Skaffold and I dont have everything clear in my head yet ! |
Hey @isengartz, I believe skaffold should be pruning images from your hosts local docker daemon upon |
@isengartz would it be possible to try to reproduce with Skaffold v1.25.0, our latest release? And if it does still happen, could you try some earlier releases to help pinpoint which change might be causing your issue? |
@briandealwis Using latest release , it builds instantly without further waiting !! |
Thanks @isengartz. Closing this issue now. Please comment if you see this again. |
Whenever I start
skaffold dev
or whenever I do a change locally skaffold outputsChecking Cache...
which last for 10 mins !!After that it outputs
Not found. Building
and builds the whole image again ! I'm working on this project for the last 8 months and I didnt have any issues until I removed the old version of skaffold ( I dont remember which one ) and installed the latest ( v1.20.0 ) via Windows Binary ( I tested the choco version too, doesnt change something ).I tried
--cache-artifacts
but I get the same issue.Expected behavior
It should sync the changes instantly
Actual behavior
It stucks at Checking Cache... for 10 min then rebuild the whole image
Information
Steps to reproduce the behavior
skaffold dev
The text was updated successfully, but these errors were encountered: