-
Notifications
You must be signed in to change notification settings - Fork 273
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
Missing files from docker image #2299
Comments
Hey @csgergo123. That's quite odd. We'd need quite a bit more information to go on though to try and debug. Can you share the configuration for the module in question? |
I run in to something with sounds like the same issue, when I'm debugging next and it happens I'll grab some repo steps (The project is opensource, so hopefully you can replicate). I have a work around at the moment, which is to make a whitespace change to the Docker file and save it - it seems to resolve it. |
Hey @edvald . Most of the times the process going well. But sometimes the node application crashes.
Screenshot. https://ibb.co/bBrYC9b The application seaches the knexfile in the right place but the file is not there. Sometimes the knexfile is missing, sometimes the whole db directory, sometimes completely different file. It seems random to me. Then when I edit something (even a whitespace) in a file and rebuild and redeploy with garden occasionally working well for a while. I copy some files to help to debug. /garden.yml
/admin/garden.yml
/admin/Dockerfile
|
Maybe that's related to my issue as well. I do have a PHP application. I run "composer install" locally in order to fetch all dependencies into "vendor" directory. Dockerfile is simple as: If I build image simply with docker locally, everything is in place and nothing is missing, but garden somehow excludes some of dependencies during syncing of sources to in-cluster buildkitd. One more observation, that these files are missing in local .garden/build/projectName directory. Though Garden claims about Large number of files (11375) found in module X. You may need to configure file exclusions. I'm fine with this huge amount of files :) Please disregard. It appears that Garden skips sync for directories with .git directory inside. I can understand that :) |
Yes, when this error occurs the problematic files are missing from the projectName/.garden/build/projectName directory too. |
Thanks for the added info. This tracks with my suspicion, which is that it's a concurrency problem in how we're doing build staging in the Could you try running with |
@edvald Where should I use exactly the GARDEN_LEGACY_BUILD_STAGE option? |
Sorry, should have clarified, that's an environment variable in your shell. |
Also an update: We'll revert to make that the default as of next release, while we figure out what's causing the issue. |
This temporarily mitigates #2299 by reverting back to using rsync for build staging on Windows, while we work out why exactly it fails for some users/projects. Users can still opt into the newer rsync-less mode by setting `GARDEN_EXPERIMENTAL_BUILD_STAGE=true` in their shell environment.
This temporarily mitigates #2299 by reverting back to using rsync for build staging on Windows, while we work out why exactly it fails for some users/projects. Users can still opt into the newer rsync-less mode by setting `GARDEN_EXPERIMENTAL_BUILD_STAGE=true` in their shell environment.
@edvald It seems v0.12.20 solves the error with the default rsync setting. Thank you. |
Oops, this is still an active issue, misread it. |
@edvald I think I'm facing a similar problem.
I have tried My
My
I've checked What drives the list of files that are being copied to Also I wonder, why does garden even need to copy all the module files to that project |
@csgergo123 this was fixed in #4434 and #4438. Feel free to reopen if it's still an issue. |
Bug
Current Behavior
It seems sometimes the garden.io builds incorrectly the docker image. Somehow one file is missing from the image that is there in the source folder in my machine. Files are missing according to the error log. The missing file is not always the same.
garden build
-> The build is successful.garden deploy
-> The deploy process sometimes works fine, sometimes fails with a custom error (because of the missing files). Moreover, when the deployment process is fine too, sometimes the running pod crashes because of the same error. So either shows the error already during deployment or in the running container after deployment.It's important to mention that sometimes everything works great, and then after a few minutes this error occurs, even though nothing changes in the source code that can cause it. It seems random to me.
If I see in the container what is built from the image what the garden.io built, I really can't find the files there that should be there.
Expected behavior
Workaround
Need to run the
garden deploy
orgarden dev
more than once. It can be up to 10.Your environment
The text was updated successfully, but these errors were encountered: