Skip to content

Have a mocked up environment for developing locally #190

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

Closed
wants to merge 8 commits into from

Conversation

emettely
Copy link
Contributor

@emettely emettely commented Apr 9, 2021

Is your Pull Request request related to another issue in this repository ?

Having a look over the Firebase docs, it looks like many more features are supported for emulators!
Which means a lot of the scripts and dependencies to run servers in parallel can now be simplified.

I have been working from an older version of docs when speaking about their testing strategy - they encourage to use emulators over serve. See https://firebase.google.com/docs/hosting/test-preview-deploy and https://medium.com/firebase-developers/setting-up-a-fully-functional-database-in-firebase-emulator-b0199fff0252

Describe what the PR does

  • npm run start should now start the emulator, use the emulated DB and have a hot-reloading local version.
  • removed unnecessary deps
  • I've updated the browser API key in GCP - to accept from localhost:5000/* as well, in case you want to run the build version using the emulator.
  • Import dummy data when running emulator
  • updated firebase dependencies
  • mechanism to update firestore security rules. Also see Write a test for a signed in user #189 (comment) for context as to why it's copying over the security rules

State whether the PR is ready for review or whether it needs extra work
Ready

Additional context

@emettely emettely self-assigned this Apr 9, 2021
@emettely emettely marked this pull request as draft April 9, 2021 10:59
@emettely emettely marked this pull request as ready for review April 12, 2021 08:18
@emettely emettely changed the title [refactor] Use emulators instead of middleware proxy Have a mocked up environment for developing locally Apr 12, 2021
@allishultes
Copy link
Contributor

When running this locally, it doesn't let me open a project to advance to the next workspace view... so the project hyperlinks aren't working
Screenshot 2021-04-12 at 10 14 23

@emettely
Copy link
Contributor Author

emettely commented Apr 12, 2021

When running this locally, it doesn't let me open a project to advance to the next workspace view... so the project hyperlinks aren't working

You need to use your fake user - [email protected] password :)

@emettely
Copy link
Contributor Author

emettely commented Apr 12, 2021

@leihelondon as discussed this morning - we'd need a ticket for setting up a dummy storage and transcription as it's not implemented as part of the emulators yet... but it does look like it's just around the corner: firebase/firebase-tools#1738

We might either: wait it out, or maybe try out the beta version 🗡️

Hey folks, if you're following this thread and willing to be an Alpha tester of "Bug fixes and Performance Improvements 😉" related to this bug, follow these steps:

Sign up for the Firebase Alpha program
Send an email to [email protected], make sure to send it from the email address you will use for testing.
Please only do this if you're seriously interested in trying out an early-stage, buggy "performance improvement" and providing feedback! There will be issues and some parts of the setup will be hard, but we want to know what you think.

The local environment will try and upload a file, but will fail like so:
Screenshot 2021-04-12 at 10 21 00

@leihelondon
Copy link

As discussed, moving this to backlog until we have a solution for emulating storage.

@emettely emettely closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants