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

Tomandersen/count api #1236

Merged
merged 53 commits into from
Mar 20, 2023
Merged

Tomandersen/count api #1236

merged 53 commits into from
Mar 20, 2023

Conversation

tom-andersen
Copy link
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.
tom-andersen and others added 30 commits February 10, 2023 13:15
* Firestore COUNT API

* Exempt from go/allstar check (#1173)

* Token-changed listeners for iOS AppCheck (#1172)

* [macOS sandbox mode] Application group name mangling for semaphores (#1167)

When macOS Sandbox mode is enabled, macOS requires that semaphores have a name that is prefixed by the App's Group Name. If the semaphore's name doesn't match this convention then its creation fails.

Unfortunately there's no official way for the SDK to query the app's group name at runtime, so we can't automatically mangle the semaphore names.

Instead I've updated the SDK to use an Info.plist property named FBAppGroupEntitlementName on macOS. If that property is present then the SDK will use it's value to prefix the semaphore names.

As an additional issue, the SDK attempted to detect semaphore creation errors by comparing the semaphore handle to nil. But in the case of macOS, a semaphore creation error returns SEM_FAILED which is 0xFFFFFFFFFFFFFFFF, not nil. And on Linux, sem_init returns -1. I've updated the corresponding platform implementations to detect the correct  values for these errors.

* Setup Desktop test workflow that detects C++ SDK breakage caused by iOS SDK changes (#1162)

* [Bugfx] Fix Nightly Test Report template (#1181)

* Reduce number of RewardedAd loads on iOS in CI (#1180)

The GMA backend doesn't whitelist iOS devices running in CI which means number of ads that can be served to iOS in CI is restricted. This is true even when using the prescribed Demo Ad Unit Id.

This PR reduces the number of ads we load on iOS in an attempt to minimize the chance of encountering NoFillErrors and push our CI to green.

* Firestore COUNT implementation (WIP)

* Firestore COUNT implementation (WIP)

* Fix linting

* Fix linting

* Fix linking

* Cleanup

* Fix release notes

* Format

* Fixes from review

* Formatting

* Responding to PR comments.

* Add Hash

* Add Hash

* Fix copyright year

* Rename

* Format

* Rename

* Fixup constructor/assignment parameter naming.

* Format

---------

Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com>
Co-authored-by: Matthew Hyndman <almostmatt@google.com>
Co-authored-by: DellaBitta <DellaBitta@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>
…1167)

When macOS Sandbox mode is enabled, macOS requires that semaphores have a name that is prefixed by the App's Group Name. If the semaphore's name doesn't match this convention then its creation fails.

Unfortunately there's no official way for the SDK to query the app's group name at runtime, so we can't automatically mangle the semaphore names.

Instead I've updated the SDK to use an Info.plist property named FBAppGroupEntitlementName on macOS. If that property is present then the SDK will use it's value to prefix the semaphore names.

As an additional issue, the SDK attempted to detect semaphore creation errors by comparing the semaphore handle to nil. But in the case of macOS, a semaphore creation error returns SEM_FAILED which is 0xFFFFFFFFFFFFFFFF, not nil. And on Linux, sem_init returns -1. I've updated the corresponding platform implementations to detect the correct  values for these errors.
* Disable getSessionId test on Android emulator.

* Also skip on iOS simulator.
# Conflicts:
#	firestore/src/include/firebase/firestore/aggregate_query_snapshot.h
#	firestore/src/main/aggregate_query_main.h
#	firestore/src/main/aggregate_query_snapshot_main.h
* Fix linking

* Cleanup

* Responding to PR comments.

* Rename

* Rename

* Fixup constructor/assignment parameter naming.

* Add Test

* Format

* Add test

* Add test

* Format

* Recognize NaN filter probelm

* Add tests

* Add tests

* Add tests

* Test is_valid()

* Add constructor and assignment tests.

* Rename variable

* Format

* Remove extra semicolon

* Add self move assignment test

* Format

* Simplify
# Conflicts:
#	firestore/integration_test_internal/src/aggregate_query_snapshot_test.cc
#	firestore/integration_test_internal/src/aggregate_query_test.cc
@tom-andersen tom-andersen marked this pull request as ready for review March 9, 2023 15:36
@tom-andersen tom-andersen requested a review from dconeybe March 9, 2023 15:36
# Conflicts:
#	firestore/integration_test_internal/src/aggregate_query_snapshot_test.cc
#	firestore/integration_test_internal/src/aggregate_query_test.cc
#	firestore/src/common/aggregate_query.cc
#	firestore/src/common/aggregate_query_snapshot.cc
#	firestore/src/main/aggregate_query_main.h
#	release_build_files/readme.md
@dconeybe dconeybe assigned tom-andersen and unassigned dconeybe Mar 16, 2023
@tom-andersen tom-andersen merged commit f51eeec into count Mar 20, 2023
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Mar 20, 2023
@github-actions
Copy link

github-actions bot commented Mar 20, 2023

❌  Integration test FAILED

Requested by @tom-andersen on commit f51eeec
Last updated: Mon Mar 20 13:32 PDT 2023
View integration test log & download artifacts

Failures Configs
firestore
(6 items)[BUILD] [ERROR] [Android] [All 3 os]
[BUILD] [ERROR] [Linux] [x64] [openssl]
[BUILD] [ERROR] [MacOS] [x64] [openssl]
[BUILD] [ERROR] [Windows] [x64] [openssl]
[BUILD] [ERROR] [iOS] [macos]
[BUILD] [ERROR] [tvOS] [macos]

Add flaky tests to go/fpl-cpp-flake-tracker

@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Mar 20, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Mar 20, 2023
tom-andersen added a commit that referenced this pull request Apr 5, 2023
* Firestore COUNT API (#1174)

* Firestore COUNT API

* Exempt from go/allstar check (#1173)

* Token-changed listeners for iOS AppCheck (#1172)

* [macOS sandbox mode] Application group name mangling for semaphores (#1167)

When macOS Sandbox mode is enabled, macOS requires that semaphores have a name that is prefixed by the App's Group Name. If the semaphore's name doesn't match this convention then its creation fails.

Unfortunately there's no official way for the SDK to query the app's group name at runtime, so we can't automatically mangle the semaphore names.

Instead I've updated the SDK to use an Info.plist property named FBAppGroupEntitlementName on macOS. If that property is present then the SDK will use it's value to prefix the semaphore names.

As an additional issue, the SDK attempted to detect semaphore creation errors by comparing the semaphore handle to nil. But in the case of macOS, a semaphore creation error returns SEM_FAILED which is 0xFFFFFFFFFFFFFFFF, not nil. And on Linux, sem_init returns -1. I've updated the corresponding platform implementations to detect the correct  values for these errors.

* Setup Desktop test workflow that detects C++ SDK breakage caused by iOS SDK changes (#1162)

* [Bugfx] Fix Nightly Test Report template (#1181)

* Reduce number of RewardedAd loads on iOS in CI (#1180)

The GMA backend doesn't whitelist iOS devices running in CI which means number of ads that can be served to iOS in CI is restricted. This is true even when using the prescribed Demo Ad Unit Id.

This PR reduces the number of ads we load on iOS in an attempt to minimize the chance of encountering NoFillErrors and push our CI to green.

* Firestore COUNT implementation (WIP)

* Firestore COUNT implementation (WIP)

* Fix linting

* Fix linting

* Fix linking

* Cleanup

* Fix release notes

* Format

* Fixes from review

* Formatting

* Responding to PR comments.

* Add Hash

* Add Hash

* Fix copyright year

* Rename

* Format

* Rename

* Fixup constructor/assignment parameter naming.

* Format

---------

Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com>
Co-authored-by: Matthew Hyndman <almostmatt@google.com>
Co-authored-by: DellaBitta <DellaBitta@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>

* Tomandersen/count test (#1206)

* Fix linking

* Cleanup

* Responding to PR comments.

* Rename

* Rename

* Fixup constructor/assignment parameter naming.

* Add Test

* Format

* Add test

* Add test

* Format

* Recognize NaN filter probelm

* Add tests

* Add tests

* Add tests

* Test is_valid()

* Add constructor and assignment tests.

* Rename variable

* Format

* Remove extra semicolon

* Add self move assignment test

* Format

* Simplify

* PR Followup (#1237)

* Firestore COUNT API (#1174)

* Firestore COUNT API

* Exempt from go/allstar check (#1173)

* Token-changed listeners for iOS AppCheck (#1172)

* [macOS sandbox mode] Application group name mangling for semaphores (#1167)

When macOS Sandbox mode is enabled, macOS requires that semaphores have a name that is prefixed by the App's Group Name. If the semaphore's name doesn't match this convention then its creation fails.

Unfortunately there's no official way for the SDK to query the app's group name at runtime, so we can't automatically mangle the semaphore names.

Instead I've updated the SDK to use an Info.plist property named FBAppGroupEntitlementName on macOS. If that property is present then the SDK will use it's value to prefix the semaphore names.

As an additional issue, the SDK attempted to detect semaphore creation errors by comparing the semaphore handle to nil. But in the case of macOS, a semaphore creation error returns SEM_FAILED which is 0xFFFFFFFFFFFFFFFF, not nil. And on Linux, sem_init returns -1. I've updated the corresponding platform implementations to detect the correct  values for these errors.

* Setup Desktop test workflow that detects C++ SDK breakage caused by iOS SDK changes (#1162)

* [Bugfx] Fix Nightly Test Report template (#1181)

* Reduce number of RewardedAd loads on iOS in CI (#1180)

The GMA backend doesn't whitelist iOS devices running in CI which means number of ads that can be served to iOS in CI is restricted. This is true even when using the prescribed Demo Ad Unit Id.

This PR reduces the number of ads we load on iOS in an attempt to minimize the chance of encountering NoFillErrors and push our CI to green.

* Firestore COUNT implementation (WIP)

* Firestore COUNT implementation (WIP)

* Fix linting

* Fix linting

* Fix linking

* Cleanup

* Fix release notes

* Format

* Fixes from review

* Formatting

* Responding to PR comments.

* Add Hash

* Add Hash

* Fix copyright year

* Rename

* Format

* Rename

* Fixup constructor/assignment parameter naming.

* Format

---------

Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com>
Co-authored-by: Matthew Hyndman <almostmatt@google.com>
Co-authored-by: DellaBitta <DellaBitta@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>

* Tomandersen/count test (#1206)

* Fix linking

* Cleanup

* Responding to PR comments.

* Rename

* Rename

* Fixup constructor/assignment parameter naming.

* Add Test

* Format

* Add test

* Add test

* Format

* Recognize NaN filter probelm

* Add tests

* Add tests

* Add tests

* Test is_valid()

* Add constructor and assignment tests.

* Rename variable

* Format

* Remove extra semicolon

* Add self move assignment test

* Format

* Simplify

* Pretty

---------

Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com>
Co-authored-by: Matthew Hyndman <almostmatt@google.com>
Co-authored-by: DellaBitta <DellaBitta@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>

* Tomandersen/count api (#1236)

* Firestore COUNT API (#1174)

* Firestore COUNT API

* Exempt from go/allstar check (#1173)

* Token-changed listeners for iOS AppCheck (#1172)

* [macOS sandbox mode] Application group name mangling for semaphores (#1167)

When macOS Sandbox mode is enabled, macOS requires that semaphores have a name that is prefixed by the App's Group Name. If the semaphore's name doesn't match this convention then its creation fails.

Unfortunately there's no official way for the SDK to query the app's group name at runtime, so we can't automatically mangle the semaphore names.

Instead I've updated the SDK to use an Info.plist property named FBAppGroupEntitlementName on macOS. If that property is present then the SDK will use it's value to prefix the semaphore names.

As an additional issue, the SDK attempted to detect semaphore creation errors by comparing the semaphore handle to nil. But in the case of macOS, a semaphore creation error returns SEM_FAILED which is 0xFFFFFFFFFFFFFFFF, not nil. And on Linux, sem_init returns -1. I've updated the corresponding platform implementations to detect the correct  values for these errors.

* Setup Desktop test workflow that detects C++ SDK breakage caused by iOS SDK changes (#1162)

* [Bugfx] Fix Nightly Test Report template (#1181)

* Reduce number of RewardedAd loads on iOS in CI (#1180)

The GMA backend doesn't whitelist iOS devices running in CI which means number of ads that can be served to iOS in CI is restricted. This is true even when using the prescribed Demo Ad Unit Id.

This PR reduces the number of ads we load on iOS in an attempt to minimize the chance of encountering NoFillErrors and push our CI to green.

* Firestore COUNT implementation (WIP)

* Firestore COUNT implementation (WIP)

* Fix linting

* Fix linting

* Fix linking

* Cleanup

* Fix release notes

* Format

* Fixes from review

* Formatting

* Responding to PR comments.

* Add Hash

* Add Hash

* Fix copyright year

* Rename

* Format

* Rename

* Fixup constructor/assignment parameter naming.

* Format

---------

Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com>
Co-authored-by: Matthew Hyndman <almostmatt@google.com>
Co-authored-by: DellaBitta <DellaBitta@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>

* Fix linking

* Cleanup

* Responding to PR comments.

* Rename

* Rename

* Fixup constructor/assignment parameter naming.

* Add Test

* Format

* Add test

* Add test

* Format

* Recognize NaN filter probelm

* Add tests

* Add tests

* Add tests

* Test is_valid()

* Add constructor and assignment tests.

* Rename variable

* Format

* Remove extra semicolon

* Firestore COUNT API

* [macOS sandbox mode] Application group name mangling for semaphores (#1167)

When macOS Sandbox mode is enabled, macOS requires that semaphores have a name that is prefixed by the App's Group Name. If the semaphore's name doesn't match this convention then its creation fails.

Unfortunately there's no official way for the SDK to query the app's group name at runtime, so we can't automatically mangle the semaphore names.

Instead I've updated the SDK to use an Info.plist property named FBAppGroupEntitlementName on macOS. If that property is present then the SDK will use it's value to prefix the semaphore names.

As an additional issue, the SDK attempted to detect semaphore creation errors by comparing the semaphore handle to nil. But in the case of macOS, a semaphore creation error returns SEM_FAILED which is 0xFFFFFFFFFFFFFFFF, not nil. And on Linux, sem_init returns -1. I've updated the corresponding platform implementations to detect the correct  values for these errors.

* Firestore COUNT implementation (WIP)

* Firestore COUNT implementation (WIP)

* Fix linting

* Fix linting

* Fix linking

* Disable getSessionId test on emulators. (#1193)

* Disable getSessionId test on Android emulator.

* Also skip on iOS simulator.

* Cleanup

* Fix release notes

* Format

* Fixes from review

* Formatting

* Responding to PR comments.

* Add Hash

* Add Hash

* Fix copyright year

* Rename

* Format

* Rename

* Fixup constructor/assignment parameter naming.

* Format

* Stub Android Impl

* Tomandersen/count test (#1206)

* Fix linking

* Cleanup

* Responding to PR comments.

* Rename

* Rename

* Fixup constructor/assignment parameter naming.

* Add Test

* Format

* Add test

* Add test

* Format

* Recognize NaN filter probelm

* Add tests

* Add tests

* Add tests

* Test is_valid()

* Add constructor and assignment tests.

* Rename variable

* Format

* Remove extra semicolon

* Add self move assignment test

* Format

* Simplify

* JNI Count Implementation

* Pretty

* Fix according PR comments

* Pretty

---------

Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com>
Co-authored-by: Matthew Hyndman <almostmatt@google.com>
Co-authored-by: DellaBitta <DellaBitta@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>
Co-authored-by: Jon Simantov <jsimantov@google.com>

* Fix

* Revert Query Test changes.

* Add separate file for count tests.

* Changes from PR comments

* Pretty

---------

Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com>
Co-authored-by: Matthew Hyndman <almostmatt@google.com>
Co-authored-by: DellaBitta <DellaBitta@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>
Co-authored-by: Jon Simantov <jsimantov@google.com>
@firebase firebase locked and limited conversation to collaborators Apr 20, 2023
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.
4 participants