-
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
Ignore Files/Folder From Being Watched #5358
Comments
hey @noahschumacher, thanks for opening up this issue. Skaffold is supposed to respect your |
Hi @marlon-gamez thanks for the speedy reply. My file structure is as follows:
I know that my |
@noahschumacher thanks for the update. Skaffold is supposed to omit the contents of your |
@nkubala the contents of my
I will try and put together a quick repo for reproducibility but since this issue isn't blocking our current dev I might not get to it for a few days or so. If you are trying to reproduce perhaps using this
|
Thanks @noahschumacher for the package.json |
@noahschumacher I can't find any reports of macOS ever emitting |
Will try to reproduce this in this week. |
Hi all - I would like to mention that I am encountering this issue as well with a NodeJS project. For what it's worth, I completely removed file sync from my
As soon as my project starts running after the pods are deployed. My build artifact looked like this:
For reference I added what my sync looked like above.... sync focuses on anything inside the Directory structure: Dockerfile (with a .dockerignore ignoring the node_modules)
When I remove my node_modules from local environment, build and deploy using Skaffold, I no longer have any problems running the project. |
Could this be related #6072? |
@noahschumacher are you running on an M1 mac? I think @demisx is right about this being related to #6072, which boils down to an issue with the way we're building |
We are suffering this on a PC Linux machines. We have to delete the |
@francescortiz the issue should be fixed in v2.1.0, could you try it ? |
Indeed it is. Thank you! |
As @francescortiz mentioned this has been fixed in v2.1.0. Closing the issue :) |
Expected behavior
I want to exclude a folder and its contents from being watched by Scaffold. I only want to watch files in a specific folder (
src/
) so that when I make changes to files in this folder the app re-compiles but does NOT rebuild.Actual behavior
I am attempting to use Scaffold for development with my React App. For on the fly development locally we can simply run
npm install
and thennpm start
. When a local file changes the app will recompile quite fast.Our Dockerfile for Skaffold is below:
I am ignoring node_modules in my
.dockerignore
but onRUN npm install
we rebuild them in the image. This causes Scaffold to attempt to watch node_modules folder and all its contents. However due to the size of this folder I reach the limit on the number of files I can watch and get the following errors:Error: ENOSPC: System limit for number of file watchers reached
While it might be possible to increase the number of files being watched (stackoverflow) it is not the ideal solution.
Information
My repo containing my ReactApp is outside of my repo for my k8s configs and skaffold.yaml. This is why I set the context and specify the dockerfile.
My understanding is that the
sync:
has no effect on what is actually watched. Perhaps I am incorrect here. Any and all help is really appreciated. For now we are using a different Dockerfile that builds after installing leaving behind the node_modules but this does not allow for on the fly re-compiling.The text was updated successfully, but these errors were encountered: