Skip to content

Adds an optional Source argument to DocumentReference and Query #491

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

Qw4z1
Copy link
Contributor

@Qw4z1 Qw4z1 commented Apr 10, 2024

First draft of adding a Source enum to be able to run queries on cached documents instead of waiting for server responses (avoids extra reads) or force fetching from server (ignoring cache).

Note: I haven't been able to test the js implementation as my environment seems to be broken.

Documentation

Closes #263

@nbransby
Copy link
Member

Look good, just need to add a test and have the CI turn green

@Qw4z1
Copy link
Contributor Author

Qw4z1 commented Apr 18, 2024

Added tests in a separate file to be able to toggle persistence per test. Curious to know if there is a better way to do this though...

@nbransby
Copy link
Member

The android tests for auth failed with Failed to connect to /10.0.2.2:9099, not sure why. Also there don't appear to be any js or ios test report artifacts for the build so I'm not even sure those tests ran. @Daeda88 you probably have more insight on these than me, are the ios and js tests running correctly?

@Daeda88
Copy link
Contributor

Daeda88 commented Apr 18, 2024

Auth test is unstable on Android for ci due to emulator speed I think. I'd just run it manually to be sure

@nbransby
Copy link
Member

what about ios and js, ideally I would like to know the new test ran and passed

@Qw4z1
Copy link
Contributor Author

Qw4z1 commented Apr 18, 2024

@nbransby looks like the PR workflow has if: failure() as a condition for both upload steps. I'm no expert at this, but I assume that means that artifacts and reports are only uploaded if a test has failed, right? 🤔

@Daeda88
Copy link
Contributor

Daeda88 commented Apr 18, 2024

They run on different machines, since those jobs are green, Im pretty sure the tests ran to completion

@nbransby nbransby merged commit ad577b3 into GitLiveApp:master Apr 18, 2024
2 of 3 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add DocumentReference.get(source: Source = Source.DEFAULT) to firebase-firestore for iOS/Android/JS
3 participants