How to fix “firestore: quota exceeded error while uploading rules”

亡梦爱人 提交于 2020-01-10 05:14:08

问题


I am getting an error when deploying rules using the deploy command in CI

firebase deploy --only firestore:rules --non-interactive

Output:

i  deploying firestore
i  firestore: checking firestore.rules for compilation errors...
✔  firestore: rules file firestore.rules compiled successfully
i  firestore: uploading rules firestore.rules...
i  firestore: quota exceeded error while uploading rules
? You have 2501 rules, do you want to delete the oldest 10 to free up space? (y/N)

I can fix the problem temporarily by deleting the last 10 manually, but will hit the limit again soon. Is there an easier way to purge the rules history using cli?


回答1:


using -f option the rules are deployed without asking to delete using firebase-tools 6.9.2

firebase deploy --only firestore:rules --non-interactive -f

UPDATE

this is not working anymore with firebase-tools 7.0.0

Workaround found

echo y | firebase deploy  --only firestore:rules 



回答2:


The helpful firebase support also sent us the below advice to deal with this issue.

It looks like you are hitting the rule set deployment limit. As of the moment, I can only suggest the manual deletion of old rules.

If you're deploying your app and you have no changes in your Firestore security rules, I recommend doing a partial deployment to avoid hitting the rule set limit.

You can also use the Firebase Rules API to list or delete the rule sets of your project.

There is already an existing Feature Request on how to handle this issue. However, I cannot provide an exact timeline for our releases. I will suggest visiting our blog page or release notes for the latest news.



来源:https://stackoverflow.com/questions/56050175/how-to-fix-firestore-quota-exceeded-error-while-uploading-rules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!