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

Fix #5001: Set Up Firestore and Upload Free Form Responses #5098

Merged
merged 92 commits into from
Jan 26, 2024

Commits on Jul 7, 2023

  1. Configuration menu
    Copy the full SHA
    f81bdb1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c51017f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1eadc30 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2023

  1. Refactor tests

    Some of the production code was updated in the previous commit.
    adhiamboperes committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    b258164 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50ac657 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ad3a23 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    913e2fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ea7a13 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2558c0b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4b2f8da View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bb42456 View commit details
    Browse the repository at this point in the history
  9. Fix nits

    adhiamboperes committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    277f3c9 View commit details
    Browse the repository at this point in the history
  10. Remove large tests that can't run on either local or CI.

    These scenarios are covered in other tests so I'm fine with not trying to make them work.
    adhiamboperes committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    8e7f3f6 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. Bazel BUILD dependency

    adhiamboperes committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    bd844aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a264b3a View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Update boolean naming

    adhiamboperes committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    f68e8ae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9237c66 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2023

  1. Log optional survey response

    This commit sets up the logging infrastructure, including tests.
    
    Since Firestore is introduced, some tests in the app module may be broken, and will be fixed in the next commit.
    
    This commit soes not handle actual upload to firestore yet, because firebase auth is not yet properly configured.
    adhiamboperes committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    cb22dfb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    110d96f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c1d4c19 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    931019a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    32566a6 View commit details
    Browse the repository at this point in the history
  6. Fix import ordering

    adhiamboperes committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    ba318eb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f573158 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6b4d488 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2023

  1. Configuration menu
    Copy the full SHA
    44e37b0 View commit details
    Browse the repository at this point in the history
  2. Fix npe in domain/src/test/java/org/oppia/android/domain/oppialogger/…

    …loguploader/LogUploadWorkerTest.kt
    adhiamboperes committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    d1a11d3 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2023

  1. Configuration menu
    Copy the full SHA
    cb25e31 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. Introduce AuthenticationController

    This new controller provides functionality to retrieve the current signed in user and also sign in user anonymously, and can be called from anywhere. This decouples authentication from a firestore-only use case.
    
    The implementation relies on an AuthenticationListener to switch out the real and fake authentication controllers for testing purposes.
    
    This commit has not included the Auth module in app module test files(Fragment/Acticity tests), hence these will fail to build with a dagger error. This is fixed in the subsequent commit.
    adhiamboperes committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    b03011c View commit details
    Browse the repository at this point in the history
  2. Fix missing KDOc

    adhiamboperes committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    d9a7fe5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c0a48da View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e6c2568 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9ad162a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0de4f3a View commit details
    Browse the repository at this point in the history
  7. Add more tests for FirestoreDataController

    Now that we can successfully mock firebase auth, we can test for upload, cache and sync scenarios.
    adhiamboperes committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    b7bafb5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7b13358 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fe1dfdf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9d66b9f View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Add TestAuthenticationModule to test files.

    This is to allow the fake version of firebase
    adhiamboperes committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    6f1fb2a View commit details
    Browse the repository at this point in the history
  2. Fix failing tests

    adhiamboperes committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    e3f1e84 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2023

  1. Rename variable in ViewEventLogsViewModel.kt

    To be more descriptive of its purpose.
    adhiamboperes committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    2996787 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ec2e3f8 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2023

  1. Fix proguarding

    Lower the versions of Firestore and Auth.
    
    The previously included versions were not compatible with older libraries currently in use within the project.
    
    I also added a dontwarn to proguard for FirestoreChannel
    adhiamboperes committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    52c438a View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2023

  1. Fix failing eventlog test

    Switch out logger for controller which should swap debug vs real event loggers
    adhiamboperes committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    dc5dac3 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2023

  1. Fix failing tests

    adhiamboperes committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    93d3c6a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a04caa9 View commit details
    Browse the repository at this point in the history
  3. Exempt AuthenticationModule from tests

    I have been unable to mock firebase for this test class since it is supposed to verify the real controller is returned, and not a mock.
    adhiamboperes committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    3e81132 View commit details
    Browse the repository at this point in the history
  4. Ignore failing test

    This test cannot pass due to the version of robolectric.
    
    There is a conflict between Firestore's SQLite database connection and Robolectric's shadow implementation of SQLite. Firestore is trying to access an illegal connection pointer (pointer 52), which indicates a problem with the database connection.
    adhiamboperes committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    aeb213e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    781644f View commit details
    Browse the repository at this point in the history
  6. Reformat @ignore

    adhiamboperes committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    ca5cd8c View commit details
    Browse the repository at this point in the history
  7. Refactor test

    Allow real auth in tests for firestore
    adhiamboperes committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    6a0b78f View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. Configuration menu
    Copy the full SHA
    bc05e0b View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. Configuration menu
    Copy the full SHA
    6bb7831 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Add FakeAuthenticationControllerFactory

    This is to swap out the real factory in tests
    adhiamboperes committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    64ad461 View commit details
    Browse the repository at this point in the history
  2. Add test for AuthenticationModule

    Ensure the production controller is always created in prod
    adhiamboperes committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    8f5fc58 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ccbc2e3 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    89a5bdf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1c7240 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    78efadc View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. Configuration menu
    Copy the full SHA
    54d2538 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d8d9d8c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4314ca0 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. Add test for TestAuthenticationModule

    And remove the test file exemption to ensure the bindings stay intentional as the modules change over time.
    adhiamboperes committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    e0bc397 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Refactor AuthenticationController and its bindings.

    Removed the factory pattern and converted the class to a singleton
    adhiamboperes committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    ffb07d9 View commit details
    Browse the repository at this point in the history
  2. Renamed AuthenticationListener to AuthenticationWrapper.kt

    I renamed it because the methods encapsulated here are required to be called by implementations of the interface.
    adhiamboperes committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    64bb998 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    85115a6 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. Create a debug interface for FirestoreEventLogger

    We can bind the same implementation instances to both listener types in Dagger (such that the debug-only module provides an implementation for DebugFirestoreEventLogger that can be used by the debug-only view models).
    adhiamboperes committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    7cccc8b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47921bd View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. Refactor DebugFirestoreEventLoggerImpl

    Instead of Injecting the real logger's factory, injecting the interface allows for swapping out the implementation with a fake for testing purposes.
    adhiamboperes committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    90cf929 View commit details
    Browse the repository at this point in the history
  2. Fix failing tests

    adhiamboperes committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    3e00d16 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. Configuration menu
    Copy the full SHA
    022ef33 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. Configuration menu
    Copy the full SHA
    35c0956 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2023

  1. Fix proguard failure.

    Updated firestore dependency
    adhiamboperes committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    ab161bf View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. Configuration menu
    Copy the full SHA
    5848741 View commit details
    Browse the repository at this point in the history
  2. Fix failing tests

    adhiamboperes committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    8215c53 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Configuration menu
    Copy the full SHA
    99a15d3 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. Configuration menu
    Copy the full SHA
    8336320 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2024

  1. Configuration menu
    Copy the full SHA
    e190fd9 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2024

  1. Address review comments

    The comment on timeout possibility and creating a sealed class for fakeauthenticationwrapperimp have not been addressed in this commit.
    adhiamboperes committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    8a8d20d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    893f6e9 View commit details
    Browse the repository at this point in the history
  3. Update maven install

    adhiamboperes committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    a8e19df View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. Configuration menu
    Copy the full SHA
    8fb5e6b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06a999c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5a1230 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4d3a893 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Configuration menu
    Copy the full SHA
    e1776b8 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Configuration menu
    Copy the full SHA
    2d4228c View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    8a0088d View commit details
    Browse the repository at this point in the history
  2. Ensure debug firestore pushes events to the cloud

    This is important so that we can verify uploads and also test appcheck
    adhiamboperes committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    dddbd98 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. Address PR feedback

    - refactor FakeAuthState from sealed to enum class
    - refactor auth timeout to constant
    - fix remove uploaded logs logic
    - fix firebase authwrapper test set up and naming
    - refactor event log viewmodel list mapping
    adhiamboperes committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    d704240 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f49d4a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e65643 View commit details
    Browse the repository at this point in the history