I got the below error, when I tried to deploy my GAE app through gcloud.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [400] This deployment has too many files. New versions are limited to 10000 files for this app.
Details: [
[
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "This deployment has too many files. New versions are limited to 10000 files for this app.",
"field": "version.deployment.files[...]"
}
]
}
]
]
Is there any way to tackle this problem?
If you really have more than the 10000 files quota in the service you're trying to deploy then you might have to reduce the number accordingly.
Other things to try:
.gcloudignore
file.Assuming you do not actually hit the files quota then the error usually indicates you have looping/circular referencing symlinks in your app directory. Which could also explain a path like the one you mentioned in a comment to this post: https://stackoverflow.com/a/42425048/4495081. You just have to fix the offending symlink(s). Again, a simple/consistent directory structure could help prevent such issues.
I tried adding to my list of skipped files in app.yaml, but whenever I did a deploy, this file was removed. I had not committed the change since its a global file, but I would have expected it to be used and preserved. How can I ensure it is being used? How do I tell what files are being downloaded by the deploy?
Dee Dave's answer below. Or use the --verbosity option for gcloud app deploy