Skip to content

Update the integration test to verify that bloom filter averted full requery #7095

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

Merged
merged 32 commits into from
Mar 10, 2023

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Mar 7, 2023

Update the integration test for the bloom filter to also verify that Watch specified a bloom filter that could be used to avert the full requery.

Googlers see b/271205722 for more details.

Ported to Android in firebase/firebase-android-sdk#4768.

@dconeybe dconeybe self-assigned this Mar 7, 2023
@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2023

⚠️ No Changeset found

Latest commit: acff0f4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 7, 2023

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (5c2ec00)Merge (1abd82c)Diff
    browser278 kB279 kB+988 B (+0.4%)
    esm5345 kB346 kB+1.14 kB (+0.3%)
    main555 kB557 kB+1.71 kB (+0.3%)
    module278 kB279 kB+988 B (+0.4%)
    react-native278 kB279 kB+988 B (+0.4%)
  • bundle

    TypeBase (5c2ec00)Merge (1abd82c)Diff
    firestore (Persistence)296 kB297 kB+968 B (+0.3%)
    firestore (Query Cursors)234 kB235 kB+968 B (+0.4%)
    firestore (Query)232 kB233 kB+968 B (+0.4%)
    firestore (Read data once)219 kB220 kB+968 B (+0.4%)
    firestore (Realtime updates)221 kB222 kB+968 B (+0.4%)
  • firebase

    TypeBase (5c2ec00)Merge (1abd82c)Diff
    firebase-compat.js761 kB762 kB+950 B (+0.1%)
    firebase-firestore-compat.js335 kB336 kB+950 B (+0.3%)
    firebase-firestore.js337 kB338 kB+988 B (+0.3%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/LhKnemWI25.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 7, 2023

Size Analysis Report 1

This report is too large (530,201 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/zlUssNaxP7.html

dconeybe added 16 commits March 7, 2023 00:22
…'t appear in common/api-review/firestore.api.md. Also do a tiny bit of cosmetic changes.
…ist of copied files

This may fix the following error:

```
[tsl] ERROR in /home/runner/work/firebase-js-sdk/firebase-js-sdk/integration/firestore/temp/test/integration/api/query.test.ts(76,50)
TS2307: Cannot find module '../util/testing_hooks_util' or its corresponding type declarations.
```

https://github.com/firebase/firebase-js-sdk/actions/runs/4351236611/jobs/7602696515
…smatchInfoFromRaw() to help debug this error:

```
TypeError: Cannot read properties of undefined (reading 'existenceFilter')
```

https://github.com/firebase/firebase-js-sdk/actions/runs/4355588983/jobs/7612412525
… Property 'ignoreUndefinedProperties' does not exist on type '{ host: string; ssl: boolean; }'"

This reverts commit c1437bc.

Importing @firestore/types didn't work in CI... ugh.
@dconeybe dconeybe marked this pull request as ready for review March 9, 2023 01:59
@dconeybe dconeybe requested a review from milaGGL March 9, 2023 20:09
@dconeybe
Copy link
Contributor Author

dconeybe commented Mar 9, 2023

@milaGGL I'm not sure why the "Test All Packages / Node.js and Browser (Chrome) Tests (push)" check is failing. It's failed for two completely different reasons in a row. Can you review despite that failure?

dconeybe added 2 commits March 9, 2023 15:53
…unt to be less confusing, since I've already confused myself with this naming
…rgeting non-master branches.

This is a cherry-pick of #7110
// it sends ExistenceFilter messages. Some day the emulator _may_
// implement this logic, at which time this short-circuit can be
// removed.
if (USE_EMULATOR) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove the (USE_EMULATOR ? it.skip : it)( on line 2071, since we are passing the test here if it is emulator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of skipping the entire test I made a modification later on in the test to ignore the erroneous snapshot when the query is resumed. With that, the test can run, and pass, against the emulator. It doesn't really test much, but it at least tests what it can.

@@ -192,7 +192,7 @@ export async function withTestDbsSettings(
}

try {
await fn(dbs);
return await fn(dbs);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we return here, can it go to the finally block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will still execute the finally block.

Copy link
Contributor

@milaGGL milaGGL left a comment

Choose a reason for hiding this comment

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

LGTM

@dconeybe dconeybe merged commit 7c20d7d into mila/BloomFilter Mar 10, 2023
@dconeybe dconeybe deleted the dconeybe/BloomFilterComplexIntegrationTest branch March 10, 2023 14:56
@firebase firebase locked and limited conversation to collaborators Apr 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants