-
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
File Sync fails when syncing thousands of files: kubectl argument list too long #4821
Comments
Hi @dfernandezm , thanks for opening this issue! I'm currently wondering what could be done about this. It seems like we're simply running in to the hard limit that's defined by your OS (more context here). Perhaps the kubectl call could be split into multiple calls based off the user's ARG_MAX or equivalent for other OS's? Would it be possible for you to create some kind of public repo that we could use to recreate this issue? |
Hi @MarlonGamez, thanks for the attention. I can definitely try. Would it be enough the following?
I won't be able to provide a testing kubernetes cluster, is that ok? Also, even I am quite a newbie in Go, I'll be glad to help with a fix if pointed in the right area of the code and provided with an approach. Thanks a lot. |
@dfernandezm could you describe what was going on at the time? Skaffold has a file-system event debouncer that should try to wait for a quiet period before perfoming a sync. It looks like Skaffold is trying to delete hundreds of .class files. Why did these class files disappear? |
@briandealwis thanks for your reply. There is a build happening, affecting thousands of files, the build is 'cleaning' and recreating the files in that folder. This process takes 10-20 seconds in total, during which Skaffold tries to sync and fails. I remember all this syncing was working at some point, this is why it was implemented like this, but it's possible there are more files now. |
Do you think this sync is happening mid-way during your rebuild? If so, you could try using I think Skaffold should support alternative sync strategies, such as using rsync or mutagen, but that's a longer-term change. |
This is a good point, maybe a manual trigger would work for backend engineers (lots of automated deletion, batched builds) while leaving frontend with polling (immediate changes). Will test and feed back. |
@dfernandezm what kind of builder are you using? A |
This app uses a customised 'jib' build, which in turn fires a gradle build with multiple steps, one of them does a custom clean task very time that deletes all those files. On top of that, IntelliJ IDEA may clear them too. I have to still test the option of the manual trigger, but that'd be a workaround. |
This is issue has been created off the back of a comment in another:
#531 (comment)
Expected behavior
FileSync should work without error
Actual behavior
Errors happen during the File Sync:
Information
Steps to reproduce the behavior
Run skaffold command like this:
The text was updated successfully, but these errors were encountered: