firebase / firebase/firebase-tools
Randomly occurring `Build failed` errors when deploying functions
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### Environment info
+ firebase --version
8.1.1
+ uname -a
Linux prd-lts-use1c-200424163427-wpricxfecnkpxxxpngkc7q 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
### Steps to reproduce
run `firebase deploy`
### Expected behavior
All functions should be deployed successfully.
### Actual behavior
Different functions randomly fail to deploy with similar error messages.
```
⚠ functions[[hidden](us-central1)]: Deployment error.
Build failed: {"cacheStats": [{"status": "MISS", "hash": "fdbd40b27d9759d46542fac41a9b0bebd2da09da26523b17fb79edd55c2eafa5", "type": "docker_layer_cache", "level": "global"}, {"status": "HIT", "hash": "fdbd40b27d9759d46542fac41a9b0bebd2da09da26523b17fb79edd55c2eafa5", "type": "docker_layer_cache", "level": "project"}]}
```
...
```
Functions deploy had errors with the following functions:
[hidden]
To try redeploying those functions, run:
firebase deploy --only functions:[hidden]
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
```
Contributor guide
Research direction
Start by reproducing `firebase deploy` with Firebase CLI 8.1.1 in the reported Linux environment, then compare which functions fail and inspect the reported `cacheStats` output. Done means the intermittent build failure has a confirmed cause and affected functions deploy successfully without the error.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100