0

I have a .gcloudignore but still keep getting the error:

Your proposed upload is larger than the maximum

Is there any way to see which files will be deployed or otherwise debug this? A bit like git add . -n since it takes 10mins to try a full deploy process.

I have a layout like below.

  • I've tried placing the .gcloudignore at the top level and also inside the functions dir.
  • I've tried deploying from both within 'functions' and also from the top level.
  • made sure the gcloudignore ALSO will ignore everything in .gitignore by using the special directive.
  • made sure the .gitignore is available at the same level as .gcloudignore
  • checked the enabled status of the .gcloudignore

But it still doesn't work and is preventing deployment.


├── cloud_tasks_emulator
│   └── docker-compose.yaml
├── firebase-debug.log
├── firebase.json
├── firestore.indexes.json
├── firestore.rules
├── functions
│   ├── lib/  <== compiled ts>js output
│   ├── node_modules
│   ├── package-lock.json
│   ├── package.json
│   ├── renders/  <== this local folder i'm trying to ignore
│   ├── src/  <== also i dont really want .ts src deployed
│   └── yarn.lock
├── justfile
├── package-lock.json
├── package.json
└── storage.rules

And the .gcloudignore looks like this

# files to not upload to gcloud

# include the gitignore also https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore
#!include:.gitignore

.gcloudignore
.git
.gitignore

renders
functions/renders
renders/

links / related

dcsan
  • 11,333
  • 15
  • 77
  • 118
  • Can you check this [link1](https://github.com/GoogleCloudPlatform/php-docs-samples/issues/845), [link2](https://stackoverflow.com/a/56780364/18265570) & [link3](https://stackoverflow.com/a/60395222/18265570)? – Roopa M Jan 13 '23 at 13:14
  • thanks for the links, i read through hopefully but mostly seems about noob mistakes like leaving leading spaces in an .ignore file... – dcsan Jan 14 '23 at 18:06
  • Have you tried removing leading spaces? does it works? – Roopa M Jan 16 '23 at 07:00
  • I didn't have any leading spaces! that's a pretty silly thing to leave in a config file :/ – dcsan Jan 16 '23 at 10:14

1 Answers1

1

Seems like .gcloudignore file is meant for only GCP deployment, not for firebase deployments. As there are no commands related to firebase in the documentation that you shared, only gcloud commands respect the .gcloudignore file. Hence, the files are not ignored in firebase deploy.

To ignore files on firebase deployment, you may use ignore field in the firebase.json file as discussed here.

To see which files will be deployed, try ListFiles endpoint, which will list remaining files to be uploaded for the specified version.

Roopa M
  • 2,171
  • 4
  • 12