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

sync: disableDownload -- Syncing files to / appears that devspace still processes index for entire container #1218

Closed
harryttd opened this issue Nov 18, 2020 · 2 comments · Fixed by #2835
Labels
area/sync Issues related to the real-time code synchronization kind/feature New feature or feature request

Comments

@harryttd
Copy link
Contributor

harryttd commented Nov 18, 2020

What happened?
My containers workdir is /. I set containerPath: /. It appears the container may be copying all files in root to local computer. Trying to set disableDownload did not help. Initial sync never finishes.

I left sync running once for a while and finally got an out of memory error.

Setting downloadExcludePaths: ["/"] worked however.

Thanks @LukasGentele for all your help.

What did you expect to happen instead?
With disableDownload initial sync should happen quickly and syncing should begin. Entire container index should not be processed.

How can we reproduce the bug? (as minimally and precisely as possible)
Have image with workdir /. Try syncing files to the container. That should hopefully reproduce as that is what I have going on.

Local Environment:

  • DevSpace Version: [use devspace --version]: 5.2.2
  • Operating System: mac
  • Deployment method: kubectl apply

Kubernetes Cluster:

  • Cluster: minikube
  • Kubernetes Version: [use kubectl version]
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T18:49:28Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:58Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}

Anything else we need to know?

/kind bug

@FabianKramm
Copy link
Collaborator

FabianKramm commented Nov 18, 2020

@harryttd thanks for opening this issue! Currently if the option disableDownload is enabled, devspace will still try to gather the remote files once initially (in your case these are probably too many hence why it gets stuck). We have to do this to check which files are there and which files need to be uploaded initially, otherwise the initial sync would not work.

By excluding / in the downloadExcludePaths, the remote side does not try to discover any files initially which is why it is a lot faster, however devspace will upload now all local files everytime the sync starts. The correct approach here is to exclude in the downloadExcludePaths the big folders that take devspace so long to parse or do a !application exclusion for example. We could also add an option to completely disable the initial sync as well if that is what you want.

@FabianKramm FabianKramm added area/sync Issues related to the real-time code synchronization kind/feature New feature or feature request labels Nov 18, 2020
@LukasGentele
Copy link
Contributor

@FabianKramm we should document that ! works in exclude paths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sync Issues related to the real-time code synchronization kind/feature New feature or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants