0

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 = xyz@domainname.com
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.

Sattanathan
  • 453
  • 9
  • 24
  • 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 app – Chris32 Dec 12 '20 at 13:20
  • 1
    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. https://cloud.google.com/appengine/docs/standard/php/config/appref – Zack Dec 13 '20 at 04:47
  • @Chris32 and Zack, Thanks for your kind reply, I will check and let you know. – Sattanathan Dec 14 '20 at 04:02
  • @Chris32, Zack, I tried 'skip_files' property in the app.yaml, But, Same deployment issue more than 10k files. I m using this lib https://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 Dec 14 '20 at 11:50
  • What I think that is happening is that you installed all your libraries in the same sourde "C:\myproject" so when you are trying to deploy the app.yaml file in that folder Gcloud is trying to pull all those installed libraries. What you have to do is move your app files without your libraries to a clean folder and retry. If I'm correct most likely your app doesn't usually have more than 20, 50 or 100 files itself. Am I right? – Chris32 Dec 14 '20 at 11:57
  • @Chris32, I deployed 1000 days all libraries in the same source "C:\myproject", that one deployed and I used GAE, Now only I m getting this issues. Okay, I will keep only my projects file in my source, But I need this lib github.com/googleapis/google-api-php-client, to get Google API PHP client services for my projects, From where can I access this library, Bcz I need a static version of this lib. Plz help me, thanks in Advance – Sattanathan Dec 14 '20 at 12:25
  • 1
    could you try to deploy again after running this command? gcloud config set app/trigger_build_server_side false – Chris32 Dec 14 '20 at 12:52
  • Thank You @Chris32, this one gcloud config set app/trigger_build_server_side false - fixed my issue, Now I can deploy more than 10k files without any issues. Thank You very much. – Sattanathan Dec 15 '20 at 05:05

1 Answers1

1

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

Chris32
  • 4,716
  • 2
  • 18
  • 30