You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy via the firebase-tools CLI a Cloud Function with a dedicated service account ;
Check in the Google Cloud console, when you edit the previous Cloud Function, you can see that this field is blank.
[REQUIRED] Expected behavior
In the Google Cloud console > Cloud Functions > edit one
In the Runtime Service Account, no change has to be done, the initial service account has to be the same as the previous deployment.
[REQUIRED] Actual behavior
No error in the deployment but the initial service account seems to be replace by a "blank" one.
Were you able to successfully deploy your functions?
Yes, but my dedicated service account used to run the Cloud Function has specific IAM rights, so I have a service interrupt for my users.
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.
Previously, cloud functions for firebase did not support many Cloud features, so we decided to leave any unspecified fields alone. This confused many customers who expected that deleting a configuration from their code to change that code, so in 4.0 we made a breaking change: your backend will be made to explicitly match what is in your code by default.
You can revert this behavior change using the new preserveExistingChanges option, or (recommended) you can specify the serviceAccount your function runs as in code. Both v1 and v2 support a serviceAccount option. If you want to specify different service accounts for different projects, I recommend checking out our new support for parmaterized codebases as well.
I'm trying using parameterized codebases but I have this failure :
[2022-11-07T10:54:51.173Z] Got response from /__/functions.yaml Failed to generate manifest from function source: TypeError: serviceAccount.includes is not a function
[2022-11-07T10:54:51.177Z] Failed to parse functions.yamlincomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 60:
... from function source: TypeError: serviceAccount.includes is not ...
^ {"name":"YAMLException","reason":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line","mark":{"name":null,"buffer":"Failed to generate manifest from function source: TypeError: serviceAccount.includes is not a function\n\u0000","position":59,"line":0,"column":59},"message":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 60:\n ... from function source: TypeError: serviceAccount.includes is not ... \n ^"}
[2022-11-07T10:54:51.181Z] shutdown requested via /__/quitquitquit
Error: Failed to load function definition from source: Failed to generate manifest from function source: TypeError: serviceAccount.includes is not a function
Error: Process completed with exit code 1.
The CF_SERVICE_ACCOUNT is configured in my functions/.env.[default|preproduction|production] like this : CF_SERVICE_ACCOUNT=cloud-functions-runner@<PROJECT_ID>.iam.gserviceaccount.com
Do you have an idea where I made a mistake ?
I upgraded to the latest Firebase tools CLI : 11.16.0
Activity
google-oss-bot commentedon Oct 21, 2022
I found a few problems with this issue:
inlined commentedon Oct 31, 2022
Previously, cloud functions for firebase did not support many Cloud features, so we decided to leave any unspecified fields alone. This confused many customers who expected that deleting a configuration from their code to change that code, so in 4.0 we made a breaking change: your backend will be made to explicitly match what is in your code by default.
You can revert this behavior change using the new
preserveExistingChangesoption, or (recommended) you can specify the serviceAccount your function runs as in code. Both v1 and v2 support aserviceAccountoption. If you want to specify different service accounts for different projects, I recommend checking out our new support for parmaterized codebases as well.fgruchala commentedon Nov 7, 2022
Hi @inlined ,
I'm trying using parameterized codebases but I have this failure :
In my code, I have this :
The
CF_SERVICE_ACCOUNTis configured in myfunctions/.env.[default|preproduction|production]like this :CF_SERVICE_ACCOUNT=cloud-functions-runner@<PROJECT_ID>.iam.gserviceaccount.comDo you have an idea where I made a mistake ?
I upgraded to the latest Firebase tools CLI :
11.16.0taeold commentedon Nov 7, 2022
@fgruchala I think we should take a look at this issue separately. Created a new bug!