0
votes

My production site developed in CodeIgniter Frame work, It has more than 10k files, I deployed last week successfully without any issues. Today My deployment got failed, I just corrected one query in script.

I got the below issues

C:\myproject>gcloud app deploy --version 13 app.yaml
Services to deploy:

descriptor:      [C:\myproject\app.yaml]
source:          [C:\myproject]
target project:  [xyz]
target service:  [uat]
target version:  [13]
target url:      [https://uat-dot-xyz.appspot.com]


Do you want to continue (Y/n)?  Y
    Beginning deployment of service [uat]...
    #============================================================#
    #= Uploading 0 files to Google Cloud Storage                =#
    #============================================================#
    File upload done.
    ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: This deployment has too many files. New versions are limited to 10000 files for this app.
    - '@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[...]

I referred the below SO posting

gcloud app deploy failed because deployment has too many files for PHP CodeIgnitor files

gcloud app deploy : This deployment has too many files Approaches for overcoming 10000 file limit on Google App Engine?

Communicating between google app engine services

I enabled .gcloudignore file as per the below and created in myproject

https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore

How to include files in .gcloudignore that are ignored in .gitignore

C:\>gcloud config set gcloudignore/enabled true
Updated property [gcloudignore/enabled].

C:\>gcloud config list
[accessibility]
screen_reader = False
[compute]
region = region-name
zone = zone-name
[core]
account = [email protected]
disable_usage_reporting = True
project = xyz
[gcloudignore]
enabled = true

My current Cloud SDK version is: 320.0.0

Installing components from version: 320.0.0

I could not find the solution. Why suddenly My deployment failed Using Gcloud SDK to GAE flexible environment ( Note: My project has more than 10 k files, Upto Last week I didnt get this issue)

Plz, Help me to solve this issue, If I miss anything in this, Thanks in Advance.

1
You are probably deploying your app + libraries files installed in your local env, check this and deploy just the files of your code. If you are not able to workaround this by removing libraries from the env you can try to request a quota increase or dockerize your appChris32
To build on @Chris32 's comment. You can use the 'skip_files' property in the app.yaml to ensure unwanted files/directories in your project are not deployed. cloud.google.com/appengine/docs/standard/php/config/apprefZack
@Chris32 and Zack, Thanks for your kind reply, I will check and let you know.Sattanathan
@Chris32, Zack, I tried 'skip_files' property in the app.yaml, But, Same deployment issue more than 10k files. I m using this lib github.com/googleapis/google-api-php-client, Is there any workaround to get this lib outside from google app engine? Could you plz help me? thanks in advance.Sattanathan
could you try to deploy again after running this command? gcloud config set app/trigger_build_server_side falseChris32

1 Answers

1
votes

It looks that there was a change on the way App Engine deploy the files.

Running the command gcloud config set app/trigger_build_server_side false solved the issue

Now on Dec 15 this change seems to be reverted and normal deploys should be working as before