首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Firebase CLI -抑制用户Prompts

Firebase CLI -抑制用户Prompts
EN

Stack Overflow用户
提问于 2021-11-09 17:27:07
回答 1查看 145关注 0票数 0

我正在通过firebase-cli部署一个函数,该函数具有一个与文档相同的minInstances param。不过,现在有一个用户提示来确认估计费用:

代码语言:javascript
复制
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔  functions: required API cloudfunctions.googleapis.com is enabled
✔  functions: required API cloudbuild.googleapis.com is enabled
i  functions: preparing . directory for uploading...
i  functions: packaged . (230.66 KB) for uploading
⚠  functions: The following functions have reserved minimum instances. This will reduce the frequency of cold starts but increases the minimum cost. You will be charged for the memory allocation and a fraction of the CPU allocation of instances while they are idle.

    testFunctionInstances(us-central1): 2 instances, 1GB of memory each

With these options, your minimum bill will be $17.22 in a 30-day month
? Would you like to proceed with deployment? (y/N) 

这个新提示符正在破坏我们当前的部署设置。我们目前正在研究如何使用firebase-cli在“普通”状态(即没有额外的运行时参数)部署函数,然后继续使用gcloud beta来使用新的运行时参数更新现有函数的离散列表;然而,这给CI/CD增加了新的复杂性。

是否有办法抑制与财务估计有关的这类信息?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-11-09 17:51:14

问题中的警告只在估计价格上升时才出现--在一次手动部署之后,如果minInstances保持稳定,就不会立即出现。

尽管如此,您可以将--force标志添加到deploy中,这将抑制所有提示。请注意,这包括提示删除部署中缺少的函数,因此在删除函数时要小心。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69902513

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档