-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reusage of --force flag for function deployment with minimum instances (minimum bill) #6485
Comments
Hi @Buckwich, thanks for raising this issue and providing detailed feedback. Passing the Just to make sure we’re on the same page here and to get a better understanding of your use case, do you have functions in your project that do not exist in your local source code? I do agree with your feedback here, a better description for the |
Thanks for your response. Normally we don't have functions without source code, but it has happened and the error (function without source) prevented us from deploying a corrupt state of our project. If we would use |
Hi @Buckwich thanks for opening this issue. We treat min instances a bit special since they change how much customers are billed. We don't want someone to accidentally increase their bill so we gate it around a confirmation. The |
Sorry for reopening this, but I just bumped our |
I agree with @martolini, I'm facing an issue with cold starts where Google support recommends setting a min instance to our functions (https://www.googlecloudcommunity.com/gc/Serverless/GCP-cloud-function-giving-504-timeout-at-cold-start/m-p/727675), but since I have almost 20 functions, I can't keep then in the same codebase, so therefore, being forced to add the There has to be a workaround without having to set min instances manually on a terminal every time we redeploy it. Edit: Nvm, you could just use the |
[REQUIRED] Environment info
firebase-tools: 12.4.4 (should be the same on latest version)
Platform: Docker on Ubuntu on Github Action Runner
[REQUIRED] Test case
Any normal firebase project with some functions. Optionally it is using a CI/CD (non-interactive) to deploy. Adjusting the minInstances to increase the minimum bill of the project, in our case 1 is enough.
[REQUIRED] Steps to reproduce
Deploy the adjusted function optimally via a non interactive terminal, ie. github action.
[REQUIRED] Expected behavior
The function should be deployed with minInstance=1.
[REQUIRED] Actual behavior
Error message:
Pass the --force option to deploy functions that increase the minimum bill
and deployment is canceled.The problem is that we can't use the
--force
flag as this would also auto delete functions. From the help section this behaviour is also not clear. There the force flag is only documented to delete functions:Solution Idea
The
--force
flag should not be reused as a helper for other stuff than the deletion. Probably a separate flag for that would suffice, eg.--allow-bill-increase
.That flag would replace force in this file:
firebase-tools/src/deploy/functions/prompts.ts
Line 135 in ca4349d
The text was updated successfully, but these errors were encountered: