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?
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
this is not working anymore with firebase-tools 7.0.0
echo y | firebase deploy --only firestore:rules
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With