Skip to content
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

Mila/MultiDB #738

Merged
merged 19 commits into from
Jun 22, 2023
Merged

Mila/MultiDB #738

merged 19 commits into from
Jun 22, 2023

Conversation

milaGGL
Copy link
Contributor

@milaGGL milaGGL commented May 26, 2023

Add multiDB support.

Ported from cpp SDK: firebase/firebase-cpp-sdk#1321

TODO:

  • Add 2 new Firestore::GetInstance public interface to accept dynamic database name
  • Update the firestore cache to use new structure FirestoreInstanceCacheKey as key instead of FirebaseApp to identify databases in the same app while creating/deleting firestore instances.
  • Add test cases for multiDB support
  • New GetInstance method call verification
  • Instances' equality check
  • Can create & terminate multiple Firestore instances (commented out)
  • Can create and fetch documents from different Firestore instances (commented out)
  • Can listen to different Firestore instances in Parallel(commented out)
  • Can run transactions in different Firestore instances in Parallel(commented out)
  • Can terminate Firestore instances independently, or by app disposal, and restart (commented out)

How to test locally:

  1. fire up the local firestore emulator

  2. Uncomments the following line of code in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs to set the USE_FIRESTORE_EMULATOR environment variable:
    Environment.SetEnvironmentVariable("USE_FIRESTORE_EMULATOR", "true");

  3. The port number is default to “8080”. If your Firestore emulator is running on a different port number, add the following line of code to modify FIRESTORE_EMULATOR_PORT
    Environment.SetEnvironmentVariable("FIRESTORE_EMULATOR_PORT", <port_number>);

  4. Run the UIHandelerAutomated tests again. This time all tests should run against the local Firestore emulator.
    To switch back to running tests on the production backend, set the USE_FIRESTORE_EMULATOR to null.

@milaGGL milaGGL self-assigned this May 26, 2023
@milaGGL milaGGL marked this pull request as ready for review May 29, 2023 20:52
Copy link
Contributor

@tom-andersen tom-andersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is some initial feedback. I will do a more thorough review when you are ready.

firestore/src/FirebaseFirestore.cs Show resolved Hide resolved
firestore/src/FirebaseFirestore.cs Outdated Show resolved Hide resolved
firestore/src/FirebaseFirestore.cs Outdated Show resolved Hide resolved
@milaGGL milaGGL added the tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). label May 30, 2023
@milaGGL milaGGL added tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). and removed tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels May 30, 2023
@milaGGL milaGGL requested a review from tom-andersen May 30, 2023 18:22
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels May 30, 2023
@milaGGL milaGGL added tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). and removed tests: in-progress This PR's integration tests are in progress. labels May 30, 2023
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels May 31, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label May 31, 2023
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests: failed This PR's integration tests failed. labels Jun 1, 2023
@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Jun 1, 2023
@github-actions github-actions bot added tests: failed This PR's integration tests failed. and removed tests-requested: quick Trigger a quick set of integration tests. labels Jun 15, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 15, 2023
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests: failed This PR's integration tests failed. labels Jun 16, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 16, 2023
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests: failed This PR's integration tests failed. labels Jun 16, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 16, 2023
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests: failed This PR's integration tests failed. labels Jun 16, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 16, 2023
@milaGGL milaGGL requested review from tom-andersen and markarndt and removed request for tom-andersen and markarndt June 19, 2023 15:50
@milaGGL
Copy link
Contributor Author

milaGGL commented Jun 21, 2023

@tom-andersen @markarndt

@milaGGL milaGGL merged commit 5b69cd5 into main Jun 22, 2023
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests: failed This PR's integration tests failed. labels Jun 22, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 23, 2023
@firebase firebase locked and limited conversation to collaborators Jul 23, 2023
@tom-andersen tom-andersen deleted the mila/MultiDB branch August 28, 2023 15:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tests: failed This PR's integration tests failed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants