## The symptom

A project with 169 Cloud Functions and automatic deployment from GitLab CI
(`firebase deploy --only functions`) failed most of the time. First warnings:

```
functions: got "Quota Exceeded" error while trying to update projects/PROJECT/locations/us-central1/functions/FUNCTION. Waiting to retry...
```

then a list of functions that failed to create or update. It worked from one
developer's machine but not from CI.

## Why

This is Cloud Functions API quota exhaustion. Deploying ~169 functions at once
bursts past the per-minute write quota, so some functions fail while others
succeed, and it looks flaky. From a single machine the timing happened to stay
under the limit; CI hit it harder.

## The fix

Deploy in small batches with a pause between them instead of all at once. The
thread's working approach was a shell loop deploying ~20 functions at a time
with `sleep` between batches (one user noted max ~20 concurrent functions),
which made deploys succeed consistently.

Also worth doing regardless: deploy only changed functions

```
firebase deploy --only functions:name1,functions:name2
```

which avoids the burst entirely for routine deploys.

## The general lesson

Flaky-looking deploys that succeed from one machine but fail from CI are often
quota, not code. If the errors say Quota Exceeded and a retry succeeds, batch
and pace the work instead of debugging the functions.