-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support local emulator development #324
Comments
Some of the work on getting the emulator to work was done in #314 |
Add a .gitignore for a snapshots directory. Add a gulp command to fetch the most recent backup. It runs gsutil ls | tail and sees if it matches the existing snapshot or not. If it doesn't, it fetches it. It then the make-faux-firestore-export-file, which starts an empty emualtor, has it export to snapshots/CHANGE_ME, then renames the contents of that file and its name where it says CHANGE_ME to point to the most recent snapshot directory. Then have a start-emulators which does emulators:start with --import pointing to the snapshot. For extra credit, And every tim ea new snapshot is downloaded, the other ones should be removed. Also, consider having a hard-linked directory in snapshots to the most recent snapshot, which MIGHT allow the firestore export file to be made once and never again (but doesn't the name of the index file wihtin the directory also include the name of the export?)
|
Auth can now be done in the emulator: https://firebase.googleblog.com/2020/10/whats-new-at-Firebase-Summit-2020.html?utm_source=firebase&utm_medium=email&utm_campaign=newsletter |
Emulators have gotten pretty powerful: https://firebase.google.com/docs/emulator-suite/connect_firestore |
Some of the limitations in the firestore emulator seem dangerous: https://firebase.google.com/docs/emulator-suite/connect_firestore
|
Some work was done recently (which issue?)
But there currently isn't a way to use it in all local testing with realistic data, because the prod backups have to be imported into the local emulator.
Looks like there's a way to run
emulators:start --import=<blob of backup>
: firebase/firebase-tools#1968This would allow potentially getting rid of the dev instance! (Or maybe not, presumably there are still some differences in emulator vs hosted that you'd want to verify before a real deploy)
The text was updated successfully, but these errors were encountered: