Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase deploy --only functions overrides existing functions

Running firebase deploy --only functions deletes the existing functions before creating new ones. Is it possible to modify this behavior to create if not exist, update if exists, no actions if functions not being deployed?

like image 439
Quan Vuong Avatar asked Mar 12 '17 10:03

Quan Vuong


People also ask

What does firebase deploy -- only functions do?

Running firebase deploy --only functions deletes the existing functions before creating new ones.

How do I deploy firebase to a different project?

When you first initialize your Firebase Hosting project with firebase init you specify what project you want to deploy your app to. This is your default project. The use command allows you to add another project. Select the project you want to use for a different environment, and then give it an alias.

How many requests can handle a single cloud function?

Cloud Run has the capability to handle up to 80 concurrent requests with the same instance. At the opposite, Cloud Functions create as many instances as the concurrent requests.


2 Answers

You can use firebase partial deploys

$ firebase deploy --only functions:makeUppercase 

Will only deploy makeUppercase function.

Hope it helps.

Note: To deploy more than one function at once (but not all) use:

$ firebase deploy --only functions:function1,functions:function2 
like image 71
Pablo Albaladejo Avatar answered Sep 23 '22 03:09

Pablo Albaladejo


firebaser here

Running firebase deploy will deploy all functions in the project. There is currently no option to deploy just new or modified functions.

It does sound like a useful addition though, so you might want to file a feature request.

Update: since version 3.8 of the Firebase tools CLI this is possible. See Pablo's answer or the release notes.

like image 36
Frank van Puffelen Avatar answered Sep 24 '22 03:09

Frank van Puffelen