-
Notifications
You must be signed in to change notification settings - Fork 906
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
The new feature withFunctionTriggersDisabled not really disable the triggers #2857
Labels
Comments
I found a few problems with this issue:
|
@saculbr you're right I was able to reproduce this! I think this is a fairly simple race condition where this happens:
I think this theory is correct because adding a sleep works: await firebase.withFunctionTriggersDisabled(async () => {
await firebase.clearFirestoreData({
projectId: 'fir-dumpster'
});
// This prevents the race
await sleep(5000);
}); |
Moving this issue to |
@saculbr fixed in #2858 and will be released in the next version of the Firebase CLI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
Firebase 8.0.1 comes with a testing feature to disable functions triggers in emulator, I tried to use that new feature to clear Firestore data without triggering some triggers to make my tests more reliable, but that not worked, the triggers are called even wrapping custom firestore queries to delete the data manually
Steps to reproduce:
Repository with test
https://github.com/saculbr/disableTriggersIssue
Relevant Code:
The text was updated successfully, but these errors were encountered: